summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index 8f86439..eaecc14 100755
--- a/tests.py
+++ b/tests.py
@@ -65,9 +65,19 @@ class ComparisonTests(unittest.TestCase):
# a pointer compares not-equal to objects of other types
self.assertFalse(p1 == "/something/1/b")
+
+class WrongInputTests(unittest.TestCase):
+
+ def test_no_start_slash(self):
+
+ # an exception is raised when the pointer string does not start with /
+ self.assertRaises(JsonPointerException, JsonPointer, 'some/thing')
+
+
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(SpecificationTests))
suite.addTest(unittest.makeSuite(ComparisonTests))
+suite.addTest(unittest.makeSuite(WrongInputTests))
modules = ['jsonpointer']