Back to index

moin  1.9.0~rc2
Public Member Functions
MoinMoin._tests.test_wikiutil.TestInterWiki Class Reference

List of all members.

Public Member Functions

def testSplitWiki
def testJoinWiki

Detailed Description

Definition at line 67 of file test_wikiutil.py.


Member Function Documentation

Definition at line 78 of file test_wikiutil.py.

00078 
00079     def testJoinWiki(self):
00080         tests = [(('http://example.org/', u'SomePage'), 'http://example.org/SomePage'),
00081                  (('http://example.org/?page=$PAGE&action=show', u'SomePage'), 'http://example.org/?page=SomePage&action=show'),
00082                  (('http://example.org/', u'Aktuelle\xc4nderungen'), 'http://example.org/Aktuelle%C3%84nderungen'),
00083                  (('http://example.org/$PAGE/show', u'Aktuelle\xc4nderungen'), 'http://example.org/Aktuelle%C3%84nderungen/show'),
00084                 ]
00085         for (baseurl, pagename), url in tests:
00086             assert wikiutil.join_wiki(baseurl, pagename) == url
00087 

Definition at line 68 of file test_wikiutil.py.

00068 
00069     def testSplitWiki(self):
00070         tests = [('SomePage', ('Self', 'SomePage')),
00071                  ('OtherWiki:OtherPage', ('OtherWiki', 'OtherPage')),
00072                  (':OtherPage', ('', 'OtherPage')),
00073                  # broken ('/OtherPage', ('Self', '/OtherPage')),
00074                  # wrong interpretation ('MainPage/OtherPage', ('Self', 'MainPage/OtherPage')),
00075                 ]
00076         for markup, (wikiname, pagename) in tests:
00077             assert wikiutil.split_wiki(markup) == (wikiname, pagename)


The documentation for this class was generated from the following file: