Back to index

moin  1.9.0~rc2
Public Member Functions
MoinMoin._tests.test_Page.TestPage Class Reference

List of all members.

Public Member Functions

def testMeta
def testBody
def testExists
def testEditInfoSystemPage
def testSplitTitle
def testGetRevList
def testGetPageLinks
def testSendPage

Detailed Description

Definition at line 13 of file test_Page.py.


Member Function Documentation

Definition at line 23 of file test_Page.py.

00023 
00024     def testBody(self):
00025         page = Page(self.request, u'FrontPage')
00026         body = page.body
00027         assert type(body) is unicode
00028         assert 'MoinMoin' in body
00029         assert body.endswith('\n')
00030         assert '\r' not in body

Here is the call graph for this function:

Definition at line 36 of file test_Page.py.

00036 
00037     def testEditInfoSystemPage(self):
00038         # system pages have no edit-log (and only 1 revision),
00039         # thus edit_info will return None
00040         page = Page(self.request, u'RecentChanges')
00041         edit_info = page.edit_info()
00042         assert edit_info == {}

Here is the call graph for this function:

Definition at line 31 of file test_Page.py.

00031 
00032     def testExists(self):
00033         assert Page(self.request, 'FrontPage').exists()
00034         assert not Page(self.request, 'ThisPageDoesNotExist').exists()
00035         assert not Page(self.request, '').exists()

Here is the call graph for this function:

Definition at line 51 of file test_Page.py.

00051 
00052     def testGetPageLinks(self):
00053         page = Page(self.request, u"FrontPage")
00054         assert u'WikiSandBox' in page.getPageLinks(self.request)

Here is the call graph for this function:

Definition at line 47 of file test_Page.py.

00047 
00048     def testGetRevList(self):
00049         page = Page(self.request, u"FrontPage")
00050         assert 1 in page.getRevList()

Here is the call graph for this function:

Definition at line 14 of file test_Page.py.

00014 
00015     def testMeta(self):
00016         page = Page(self.request, u'FrontPage')
00017         meta = page.meta
00018         for k, v in meta:
00019             if k == u'format':
00020                 assert v == u'wiki'
00021             elif k == u'language':
00022                 assert v == u'en'

Here is the call graph for this function:

Definition at line 55 of file test_Page.py.

00055 
00056     def testSendPage(self):
00057         page = Page(self.request, u"FrontPage")
00058         import StringIO
00059         out = StringIO.StringIO()
00060         self.request.redirect(out)
00061         page.send_page(msg=u'Done', emit_headers=False)
00062         result = out.getvalue()
00063         self.request.redirect()
00064         del out
00065         assert result.strip().endswith('</html>')
00066         assert result.strip().startswith('<!DOCTYPE HTML PUBLIC')

Here is the call graph for this function:

Definition at line 43 of file test_Page.py.

00043 
00044     def testSplitTitle(self):
00045         page = Page(self.request, u"FrontPage")
00046         assert page.split_title(force=True) == u'Front Page'

Here is the call graph for this function:


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