Unverified Commit 3497e446 authored by Martin Weinelt's avatar Martin Weinelt
Browse files

python3Packages.django-anymail: disable failing test

After the 14.0 update we saw a failing likely related due to a MIME type
mismatch. To disable the particular test I reconfigured the package to
use standard pytest testing facilities.
parent 892be3c6
Loading
Loading
Loading
Loading
+22 −8
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@
  fetchFromGitHub,
  hatchling,
  mock,
  python,
  pytest-django,
  pytestCheckHook,
  requests,
  responses,
  urllib3,
@@ -32,20 +33,33 @@ buildPythonPackage rec {
    urllib3
  ];

  optional-dependencies = {
    amazon-ses = [ boto3 ];
  };

  nativeCheckInputs = [
    mock
    responses
    pytest-django
    pytestCheckHook
  ]
  ++ optional-dependencies.amazon-ses;

  optional-dependencies = {
    amazon-ses = [ boto3 ];
  };
  disabledTestMarks = [ "live" ];

  disabledTests = [
    # misrecognized as a fixture due to function name starting with test_
    "test_file_content"
  ];

  disabledTestPaths = [
    # likely guessed mime type mismatch
    "tests/test_resend_backend.py::ResendBackendStandardEmailTests::test_attachments"
  ];

  checkPhase = ''
    runHook preCheck
    CONTINUOUS_INTEGRATION=1 ${python.interpreter} runtests.py
    runHook postCheck
  preCheck = ''
    export CONTINOUS_INTEGRATION=1
    export DJANGO_SETTINGS_MODULE=tests.test_settings.settings_${lib.versions.major django.version}_0
  '';

  pythonImportsCheck = [ "anymail" ];