summaryrefslogtreecommitdiff
path: root/tests/test_utils/tests.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2025-01-17 22:09:56 +0100
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-20 14:07:28 +0100
commitf5772de69679efb54129ac1cbca3579b512778af (patch)
treeab215760e2e77124bbb8970b0913c2a99ae68743 /tests/test_utils/tests.py
parent61dae11df52fae71fc3050974ac459f362c9dfd7 (diff)
Fixed #36005 -- Dropped support for Python 3.10 and 3.11.
Diffstat (limited to 'tests/test_utils/tests.py')
-rw-r--r--tests/test_utils/tests.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index 359cf07402..16692500e3 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -49,7 +49,6 @@ from django.test.utils import (
)
from django.urls import NoReverseMatch, path, reverse, reverse_lazy
from django.utils.html import VOID_ELEMENTS
-from django.utils.version import PY311
from .models import Car, Person, PossessedCar
from .views import empty_response
@@ -103,11 +102,9 @@ class SkippingTestCase(SimpleTestCase):
SkipTestCase("test_foo").test_foo,
ValueError,
"skipUnlessDBFeature cannot be used on test_foo (test_utils.tests."
- "SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase%s) "
- "as SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase "
- "doesn't allow queries against the 'default' database."
- # Python 3.11 uses fully qualified test name in the output.
- % (".test_foo" if PY311 else ""),
+ "SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase."
+ "test_foo) as SkippingTestCase.test_skip_unless_db_feature.<locals>."
+ "SkipTestCase doesn't allow queries against the 'default' database.",
)
def test_skip_if_db_feature(self):
@@ -150,11 +147,9 @@ class SkippingTestCase(SimpleTestCase):
SkipTestCase("test_foo").test_foo,
ValueError,
"skipIfDBFeature cannot be used on test_foo (test_utils.tests."
- "SkippingTestCase.test_skip_if_db_feature.<locals>.SkipTestCase%s) "
+ "SkippingTestCase.test_skip_if_db_feature.<locals>.SkipTestCase.test_foo) "
"as SkippingTestCase.test_skip_if_db_feature.<locals>.SkipTestCase "
- "doesn't allow queries against the 'default' database."
- # Python 3.11 uses fully qualified test name in the output.
- % (".test_foo" if PY311 else ""),
+ "doesn't allow queries against the 'default' database.",
)