changeset 2372:704c1051e73f

more link tests as I expect things to behave
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 12 Jul 2007 13:40:38 +0200
parents 7de0a5eebf76
children 7e7560f2cddd
files MoinMoin/parser/_tests/test_text_moin_wiki.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py	Thu Jul 12 13:34:22 2007 +0200
+++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py	Thu Jul 12 13:40:38 2007 +0200
@@ -579,9 +579,11 @@
     text = 'AAA %s AAA'
     needle = re.compile(text % r'(.+)')
     _tests = (
-        # test,                     expected
-        ('["something"]',           '<a class="nonexistent" href="./something">something</a>'),
-        ("['something']",           "['something']"),
+        # test,                       expected
+        ('["something"]',             '<a class="nonexistent" href="./something">something</a>'),
+        ("['something']",             "['something']"),
+        ('MoinMoin:"something"',      '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/something" title="MoinMoin">something</a>'),
+        ("MoinMoin:'something else'", '<a class="nonexistent" href="./MoinMoin">MoinMoin</a>:\'something else\''),
         )
 
     def testTextFormating(self):
@@ -590,6 +592,6 @@
             html = self.parse(self.text % test)
             result = self.needle.search(html).group(1)
             self.assertEqual(result, expected,
-                             'Expected "%(expected)s" but got "%(result)s"' % locals())
+                             'Expected "%(expected)s" but got "%(result)s"\n' % locals())