summaryrefslogtreecommitdiff
path: root/tests/datatypes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/datatypes')
-rw-r--r--tests/datatypes/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/datatypes/tests.py b/tests/datatypes/tests.py
index a69855da1f..612b1ae2e4 100644
--- a/tests/datatypes/tests.py
+++ b/tests/datatypes/tests.py
@@ -82,8 +82,9 @@ class DataTypesTestCase(TestCase):
an error if given a timezone-aware datetime object."""
dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=utc)
d = Donut(name='Bear claw', consumed_at=dt)
- self.assertRaises(ValueError, d.save)
- # ValueError: MySQL backend does not support timezone-aware datetimes.
+ # MySQL backend does not support timezone-aware datetimes.
+ with self.assertRaises(ValueError):
+ d.save()
def test_datefield_auto_now_add(self):
"""Regression test for #10970, auto_now_add for DateField should store