Added more test cases to TestWikipage.test_from_str (one of them doesn't pass yet).
[philipp/winterrodeln/wrpylib.git] / tests / test_wrvalidators.py
index 2725b0e19093f810e1e9f5ffa2f4bf47f0fefd58..c08f044083d03d845fa1cb59a08905b5eb715c35 100644 (file)
@@ -386,6 +386,14 @@ class TestWikipage(unittest.TestCase):
             wikipage_from_str('')
         with self.assertRaises(ValueError):
             wikipage_from_str('Birgitzer Alm')
+        with self.assertRaises(ValueError):
+            wikipage_from_str('x[[Birgitzer Alm]]')
+        with self.assertRaises(ValueError):
+            wikipage_from_str('[[Birgitzer Alm]]x')
+        with self.assertRaises(ValueError):
+            wikipage_from_str('[[Birgitzer Alm]]; [[Kemater Alm]]')
+        with self.assertRaises(ValueError):
+            wikipage_from_str('[[Birgitzer Alm]], [[Kemater Alm]]')
 
     def test_to_str(self):
         self.assertEqual('[[Birgitzer Alm]]', wikipage_to_str('[[Birgitzer Alm]]'))