Skip to content

Commit 696d57a

Browse files
committed
Updated JSONField's test_invalid_value.
1 parent e630f18 commit 696d57a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/model_fields/test_jsonfield.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
@skipUnlessDBFeature("supports_json_field")
4646
class JSONFieldTests(TestCase):
4747
def test_invalid_value(self):
48-
msg = "is not JSON serializable"
49-
with self.assertRaisesMessage(TypeError, msg):
48+
msg = "cannot encode native uuid.UUID with UuidRepresentation.UNSPECIFIED"
49+
with self.assertRaisesMessage(ValueError, msg):
5050
NullableJSONModel.objects.create(
5151
value={
5252
"uuid": uuid.UUID("d85e2076-b67c-4ee7-8c3a-2bf5a2cc2475"),

0 commit comments

Comments
 (0)