nixpkgs-suyu/pkgs/development/python-modules/django/django_4_tests.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
2 KiB
Diff
Raw Normal View History

diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 6d67c2931a..0c1f407f88 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -127,6 +127,7 @@ class AdminScriptTestCase(SimpleTestCase):
del test_environ["DJANGO_SETTINGS_MODULE"]
python_path = [base_dir, django_dir, tests_dir]
python_path.extend(ext_backend_base_dirs)
+ python_path.extend(sys.path)
test_environ["PYTHONPATH"] = os.pathsep.join(python_path)
test_environ["PYTHONWARNINGS"] = ""
diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py
index 36f22d5f09..6cc6888980 100644
--- a/tests/auth_tests/test_hashers.py
+++ b/tests/auth_tests/test_hashers.py
@@ -1,4 +1,4 @@
-from unittest import mock, skipUnless
+from unittest import mock, skipUnless, skip
from django.conf.global_settings import PASSWORD_HASHERS
from django.contrib.auth.hashers import (
@@ -241,6 +241,7 @@ class TestUtilsHashPass(SimpleTestCase):
@ignore_warnings(category=RemovedInDjango50Warning)
@skipUnless(crypt, "no crypt module to generate password.")
+ @skip("Legacy crypt algorithms are unsupported in nixpkgs")
@override_settings(
PASSWORD_HASHERS=["django.contrib.auth.hashers.CryptPasswordHasher"]
)
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index 62cbffbee9..2f0ec718f8 100644
--- a/tests/settings_tests/tests.py
+++ b/tests/settings_tests/tests.py
@@ -2,7 +2,7 @@ import os
import sys
import unittest
from types import ModuleType, SimpleNamespace
-from unittest import mock
+from unittest import mock, skip
from django.conf import (
ENVIRONMENT_VARIABLE,
@@ -342,6 +342,7 @@ class SettingsTests(SimpleTestCase):
getattr(s, "foo")
@requires_tz_support
+ @skip("Assertion fails, exception does not get raised")
@mock.patch("django.conf.global_settings.TIME_ZONE", "test")
def test_incorrect_timezone(self):
with self.assertRaisesMessage(ValueError, "Incorrect timezone setting: test"):