Merge pull request #140182 from applePrincess/fix-django-taggit

This commit is contained in:
Sandro 2021-10-03 04:23:36 +02:00 committed by GitHub
commit 46eff8be45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@
, fetchPypi
, pythonOlder
, django
, djangorestframework
, mock
, isort
, isPy3k
@ -19,12 +20,15 @@ buildPythonPackage rec {
sha256 = "e5bb62891f458d55332e36a32e19c08d20142c43f74bc5656c803f8af25c084a";
};
propagatedBuildInputs = [ isort django ];
propagatedBuildInputs = [ isort django djangorestframework ];
checkInputs = [ mock ];
checkPhase = ''
# prove we're running tests against installed package, not build dir
rm -r taggit
# Replace directory of locale
substituteInPlace ./tests/test_utils.py \
--replace 'os.path.dirname(__file__), ".."' "\"$out/lib/python${lib.versions.majorMinor python.version}/site-packages/\""
${python.interpreter} -m django test --settings=tests.settings
'';