Added more test cases to TestWikipage.test_from_str (one of them doesn't pass yet).
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 27 Jan 2017 22:03:53 +0000 (22:03 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 27 Jan 2017 22:03:53 +0000 (22:03 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@2603 7aebc617-e5e2-0310-91dc-80fb5f6d2477

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]]'))