diff options
author | Julian Berman <Julian@GrayVines.com> | 2013-07-27 22:14:16 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2013-07-27 22:23:23 -0400 |
commit | 1b6d643efb29eb2666636f5109034a550e184285 (patch) | |
tree | ecda1798c5faecff2ac5ca8ec92fcd114cf769f7 /jsonschema | |
parent | f97117efbc4e99d6b2dae607563719b22891ff6e (diff) | |
download | jsonschema-1b6d643efb29eb2666636f5109034a550e184285.tar.gz |
Be sure to test schema_path somewhere.
Diffstat (limited to 'jsonschema')
-rw-r--r-- | jsonschema/tests/test_validators.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/jsonschema/tests/test_validators.py b/jsonschema/tests/test_validators.py index ac88432..ac93f61 100644 --- a/jsonschema/tests/test_validators.py +++ b/jsonschema/tests/test_validators.py @@ -424,6 +424,23 @@ class TestValidationErrorDetails(unittest.TestCase): self.assertEqual(list(e5.path), [1, "bar", "baz"]) self.assertEqual(list(e6.path), [1, "foo"]) + self.assertEqual(list(e1.schema_path), ["type"]) + self.assertEqual(list(e2.schema_path), ["items", "type"]) + self.assertEqual( + list(e3.schema_path), ["items", "properties", "bar", "type"], + ) + self.assertEqual( + list(e4.schema_path), + ["items", "properties", "bar", "properties", "bar", "required"], + ) + self.assertEqual( + list(e5.schema_path), + ["items", "properties", "bar", "properties", "baz", "minItems"] + ) + self.assertEqual( + list(e6.schema_path), ["items", "properties", "foo", "enum"], + ) + self.assertEqual(e1.validator, "type") self.assertEqual(e2.validator, "type") self.assertEqual(e3.validator, "type") |