python3Packages.django-picklefield: fix tests

This commit is contained in:
Erik Arvstedt 2020-09-06 12:15:20 +02:00 committed by Jon
parent f7a6a1a183
commit 039e248555

View File

@ -1,16 +1,27 @@
{ lib, buildPythonPackage, fetchPypi, django }: { lib, buildPythonPackage, fetchFromGitHub, django, pytest, pytest-django }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-picklefield"; pname = "django-picklefield";
version = "3.0.1"; version = "3.0.1";
src = fetchPypi { # The PyPi source doesn't contain tests
inherit pname version; src = fetchFromGitHub {
sha256 = "15ccba592ca953b9edf9532e64640329cd47b136b7f8f10f2939caa5f9ce4287"; owner = "gintas";
repo = pname;
rev = "v${version}";
sha256 = "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk";
}; };
propagatedBuildInputs = [ django ]; propagatedBuildInputs = [ django ];
checkInputs = [ pytest pytest-django ];
checkPhase = ''
PYTHONPATH="$(pwd):$PYTHONPATH" \
DJANGO_SETTINGS_MODULE=tests.settings \
pytest tests/tests.py
'';
meta = { meta = {
description = "A pickled object field for Django"; description = "A pickled object field for Django";
homepage = "https://github.com/gintas/django-picklefield"; homepage = "https://github.com/gintas/django-picklefield";