python3Packages.djangorestframework-dataclasses: run tests with pytest

Changed files
+9 -8
pkgs
development
python-modules
djangorestframework-dataclasses
+9 -8
pkgs/development/python-modules/djangorestframework-dataclasses/default.nix
···
buildPythonPackage,
fetchFromGitHub,
djangorestframework,
+
pytest-django,
+
pytestCheckHook,
setuptools,
}:
···
hash = "sha256-nUkR5xTyeBv7ziJ6Mej9TKvMOa5/k+ELBqt4BVam/wk=";
};
-
build-system = [ setuptools ];
-
postPatch = ''
patchShebangs manage.py
'';
+
+
build-system = [ setuptools ];
dependencies = [ djangorestframework ];
-
checkPhase = ''
-
runHook preCheck
-
-
./manage.py test
+
nativeCheckInputs = [
+
pytest-django
+
pytestCheckHook
+
];
-
runHook postCheck
-
'';
+
env.DJANGO_SETTINGS_MODULE = "tests.django_settings";
pythonImportsCheck = [ "rest_framework_dataclasses" ];