summaryrefslogtreecommitdiff
path: root/tests/model_fields/test_integerfield.py
diff options
context:
space:
mode:
authorT. Franzel <tfranzel@users.noreply.github.com>2023-03-11 00:34:13 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-21 19:44:41 +0100
commita2eaea8f22305b57dff3ab13add2e2887287bb6f (patch)
treea2f1acee503899e52a583572a46aeee0d1a5432c /tests/model_fields/test_integerfield.py
parent051d5944f86400b9b3476db60bc73de7e9964810 (diff)
Fixed #34388 -- Allowed using choice enumeration types directly on model and form fields.
Diffstat (limited to 'tests/model_fields/test_integerfield.py')
-rw-r--r--tests/model_fields/test_integerfield.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/model_fields/test_integerfield.py b/tests/model_fields/test_integerfield.py
index 7698160678..6761589b7e 100644
--- a/tests/model_fields/test_integerfield.py
+++ b/tests/model_fields/test_integerfield.py
@@ -301,11 +301,11 @@ class ValidationTests(SimpleTestCase):
f.clean("0", None)
def test_enum_choices_cleans_valid_string(self):
- f = models.IntegerField(choices=self.Choices.choices)
+ f = models.IntegerField(choices=self.Choices)
self.assertEqual(f.clean("1", None), 1)
def test_enum_choices_invalid_input(self):
- f = models.IntegerField(choices=self.Choices.choices)
+ f = models.IntegerField(choices=self.Choices)
with self.assertRaises(ValidationError):
f.clean("A", None)
with self.assertRaises(ValidationError):