summaryrefslogtreecommitdiff
path: root/tests/model_enums
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-07 11:07:54 +0200
committerGitHub <noreply@github.com>2023-04-07 11:07:54 +0200
commit2eb1f37260f0e0b71ef3a77eb5522d2bb68d6489 (patch)
treeca28fc4ce7ddb5f111aef3b5ce2617c16efe6caa /tests/model_enums
parent5b8a043bf51ab8bcf4a758d0b4646f30a84be183 (diff)
downloaddjango-2eb1f37260f0e0b71ef3a77eb5522d2bb68d6489.tar.gz
Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on Python 3.11.4+.
https://github.com/python/cpython/commit/5342f5e713e0cc45b6f226d2d053a8cde1b4d68e Follow up to 38e63c9e61152682f3ff982c85a73793ab6d3267.
Diffstat (limited to 'tests/model_enums')
-rw-r--r--tests/model_enums/tests.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/model_enums/tests.py b/tests/model_enums/tests.py
index 1276341108..b010b35594 100644
--- a/tests/model_enums/tests.py
+++ b/tests/model_enums/tests.py
@@ -8,7 +8,6 @@ from django.template import Context, Template
from django.test import SimpleTestCase
from django.utils.functional import Promise
from django.utils.translation import gettext_lazy as _
-from django.utils.version import PY312
class Suit(models.IntegerChoices):
@@ -312,11 +311,7 @@ class CustomChoicesTests(SimpleTestCase):
pass
def test_uuid_unsupported(self):
- if PY312:
- msg = "_value_ not set in __new__, unable to create it"
- else:
- msg = "UUID objects are immutable"
- with self.assertRaisesMessage(TypeError, msg):
+ with self.assertRaises(TypeError):
class Identifier(uuid.UUID, models.Choices):
A = "972ce4eb-a95f-4a56-9339-68c208a76f18"