diff options
author | Stefan Kögl <stefan@skoegl.net> | 2017-10-28 12:46:41 +0200 |
---|---|---|
committer | Stefan Kögl <stefan@skoegl.net> | 2017-10-29 22:44:25 +0100 |
commit | 0d30f12f3f64dbe58bd816597856fb34d9e31fcd (patch) | |
tree | 83ca1f3013e4db5b7ce073da43a2729427ffc5af /tests.py | |
parent | ba2af26490f16d1e4f7bf57791af2ade8e90fcb7 (diff) | |
download | python-json-pointer-0d30f12f3f64dbe58bd816597856fb34d9e31fcd.tar.gz |
Perform input validation in JsonPoinervalidation
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -126,6 +126,12 @@ class WrongInputTests(unittest.TestCase): doc = [0, 1, 2] self.assertRaises(JsonPointerException, resolve_pointer, doc, '/10') + def test_trailing_escape(self): + self.assertRaises(JsonPointerException, JsonPointer, '/foo/bar~') + + def test_invalid_escape(self): + self.assertRaises(JsonPointerException, JsonPointer, '/foo/bar~2') + class ToLastTests(unittest.TestCase): |