Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin._tests.test_wsgiapp.TestApplication Class Reference

List of all members.

Public Member Functions

def testWSGIAppExisting
def testWSGIAppAbsent

Static Public Attributes

tuple PAGES = ('FrontPage', 'RecentChanges', 'HelpContents', 'FindPage')
tuple NO_PAGES = ('FooBar', 'TheNone/ExistantPage/', '%33Strange%74Codes')

Detailed Description

Definition at line 14 of file test_wsgiapp.py.


Member Function Documentation

Definition at line 34 of file test_wsgiapp.py.

00034 
00035     def testWSGIAppAbsent(self):
00036         for page in self.NO_PAGES:
00037             def _test_(page=page):
00038                 appiter, status, headers = self.client.get('/%s' % page)
00039                 assert status[:3] == '404'
00040                 output = ''.join(appiter)
00041                 for needle in ('new empty page', 'page template'):
00042                     assert needle in output
00043             yield _test_

Definition at line 22 of file test_wsgiapp.py.

00022 
00023     def testWSGIAppExisting(self):
00024         for page in self.PAGES:
00025             def _test_(page=page):
00026                 appiter, status, headers = self.client.get('/%s' % page)
00027                 output = ''.join(appiter)
00028                 print output
00029                 assert status[:3] == '200'
00030                 assert ('Content-Type', 'text/html; charset=utf-8') in headers
00031                 for needle in (DOC_TYPE, page):
00032                     assert needle in output
00033             yield _test_


Member Data Documentation

tuple MoinMoin._tests.test_wsgiapp.TestApplication.NO_PAGES = ('FooBar', 'TheNone/ExistantPage/', '%33Strange%74Codes') [static]

Definition at line 20 of file test_wsgiapp.py.

tuple MoinMoin._tests.test_wsgiapp.TestApplication.PAGES = ('FrontPage', 'RecentChanges', 'HelpContents', 'FindPage') [static]

Definition at line 18 of file test_wsgiapp.py.


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