summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2020-11-17 16:52:03 -0500
committerJulian Berman <Julian@GrayVines.com>2020-11-17 16:52:03 -0500
commitfad645f9377f28e85bbbb8e4b17b5a1536c9c557 (patch)
treee502003340509ada7f708f094a7aba595912201e
parentbb75153ad4efc86f1b5cb0b58d2eddba683769af (diff)
downloadjsonschema-fad645f9377f28e85bbbb8e4b17b5a1536c9c557.tar.gz
Actually exercise Validator.is_type on an unknown type.
-rw-r--r--jsonschema/tests/test_types.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/jsonschema/tests/test_types.py b/jsonschema/tests/test_types.py
index 82071ca..4cfca79 100644
--- a/jsonschema/tests/test_types.py
+++ b/jsonschema/tests/test_types.py
@@ -190,3 +190,8 @@ class TestCustomTypes(TestCase):
with self.assertRaises(ValidationError):
validator.validate(Point(x="not an integer", y=5))
+
+ def test_unknown_type(self):
+ with self.assertRaises(UnknownType) as e:
+ Draft4Validator({}).is_type(12, "some unknown type")
+ self.assertIn("'some unknown type'", str(e.exception))