aboutsummaryrefslogtreecommitdiff
path: root/tests/serialize/errors.test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/serialize/errors.test.py')
-rw-r--r--tests/serialize/errors.test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/serialize/errors.test.py b/tests/serialize/errors.test.py
index 68adaac..7670af4 100644
--- a/tests/serialize/errors.test.py
+++ b/tests/serialize/errors.test.py
@@ -8,6 +8,7 @@ from edify import Pattern
from edify.errors.serialize import (
IncompatibleSchemaVersionError,
MissingSchemaKeyError,
+ NonObjectJSONPayloadError,
UnknownElementKindError,
)
@@ -51,8 +52,8 @@ def test_bad_json_string_raises_decode_error():
Pattern.from_json("{not-valid-json}")
-def test_non_object_json_payload_raises_type_error():
- with pytest.raises(TypeError, match="canonical JSON payload must be an object"):
+def test_non_object_json_payload_raises_non_object_json_payload_error():
+ with pytest.raises(NonObjectJSONPayloadError, match="canonical JSON payload must be an object"):
Pattern.from_json("[1, 2, 3]")