diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2023-11-29 14:44:42 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-11-29 21:12:53 +0100 |
| commit | 06c5cb1284557edc05f963afb6f6bcdd55b00911 (patch) | |
| tree | 1e0704398caf792bae7824b99e8590840f886359 /tests/model_enums | |
| parent | f5f55b41afc43ef0cd661adcb48fc9ec1b2d4ac6 (diff) | |
Refs #34986 -- Removed redundant CustomChoicesTests.test_timezone_unsupported().
This test relied on the behavior of subclassing `datetime.timezone`
which is not permitted by the C-extension version of CPython's
`datetime` module. This restriction isn't enforced by the pure
Python version, nor by PyPy.
See https://github.com/python/cpython/issues/112451
It's not critical, and doesn't test any Django behavior, so just
remove it.
Diffstat (limited to 'tests/model_enums')
| -rw-r--r-- | tests/model_enums/tests.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tests/model_enums/tests.py b/tests/model_enums/tests.py index 32f0ad3668..306bfc8d67 100644 --- a/tests/model_enums/tests.py +++ b/tests/model_enums/tests.py @@ -316,13 +316,6 @@ class CustomChoicesTests(SimpleTestCase): class Boolean(bool, models.Choices): pass - def test_timezone_unsupported(self): - msg = "type 'datetime.timezone' is not an acceptable base type" - with self.assertRaisesMessage(TypeError, msg): - - class Timezone(datetime.timezone, models.Choices): - pass - def test_uuid_unsupported(self): with self.assertRaises(TypeError): |
