From 01b4f08f8506dd397c618264a5588dbb9ce40336 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Fri, 12 Aug 2022 17:11:39 +0200 Subject: [PATCH] python310Packages.django-anymail: Enable more tests --- .../python-modules/django-anymail/default.nix | 47 +++++++++++-------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/django-anymail/default.nix b/pkgs/development/python-modules/django-anymail/default.nix index 83c89b53c97d..7936df01bd01 100644 --- a/pkgs/development/python-modules/django-anymail/default.nix +++ b/pkgs/development/python-modules/django-anymail/default.nix @@ -1,13 +1,14 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - six, - requests, - django, - boto3, - python, - mock, +{ lib +, buildPythonPackage +, fetchFromGitHub +, six +, requests +, django +, boto3 +, python +, mock +, pytestCheckHook +, pytest-django }: buildPythonPackage rec { @@ -28,20 +29,26 @@ buildPythonPackage rec { boto3 ]; - checkInputs = [ mock ]; - checkPhase = '' - substituteInPlace setup.py --replace "tests_require=[" "tests_require=[], #" - export CONTINUOUS_INTEGRATION=1 - export ANYMAIL_SKIP_TESTS="sparkpost" - ${python.interpreter} setup.py test - ''; + checkInputs = [ + pytestCheckHook + pytest-django + mock + ]; + + disabledTests = [ + # Require networking + "test_debug_logging" + "test_no_debug_logging" + ]; + + pythonImportsCheck = [ "anymail" ]; + + DJANGO_SETTINGS_MODULE = "tests.test_settings.settings_3_2"; - # this package allows multiple email backends - # sparkpost is missing because it's not packaged yet meta = with lib; { description = "Django email backends and webhooks for Mailgun"; homepage = "https://github.com/anymail/django-anymail"; license = licenses.bsd3; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ onny ]; }; }