Back to index

moin  1.9.0~rc2
Public Member Functions
MoinMoin._tests.test_packages.TestRealCreation Class Reference

List of all members.

Public Member Functions

def testSearch
def testListCreate
def testAllCreate
def testInvalidCreate

Detailed Description

Definition at line 90 of file test_packages.py.


Member Function Documentation

Definition at line 102 of file test_packages.py.

00102 
00103     def testAllCreate(self):
00104         package = PackagePages(self.request.rootpage.page_name, self.request)
00105         temp = tempfile.NamedTemporaryFile(suffix='.zip')
00106         package.collectpackage(self.request.rootpage.getPageList(
00107                                 include_underlay=False,
00108                                 filter=lambda name: not wikiutil.isSystemPage(self.request, name)),
00109                                 temp)
00110         if not package:
00111             py.test.skip("No user created pages in wiki!")
00112         assert zipfile.is_zipfile(temp.name)

Here is the call graph for this function:

Definition at line 113 of file test_packages.py.

00113 
00114     def testInvalidCreate(self):
00115         package = PackagePages(self.request.rootpage.page_name, self.request)
00116         temp = tempfile.NamedTemporaryFile(suffix='.zip')
00117         package.collectpackage(['___//THIS PAGE SHOULD NOT EXIST\\___'], temp)
00118         assert not zipfile.is_zipfile(temp.name)
00119 

Here is the call graph for this function:

Definition at line 96 of file test_packages.py.

00096 
00097     def testListCreate(self):
00098         package = PackagePages(self.request.rootpage.page_name, self.request)
00099         temp = tempfile.NamedTemporaryFile(suffix='.zip')
00100         package.collectpackage(['FrontPage'], temp)
00101         assert zipfile.is_zipfile(temp.name)

Here is the call graph for this function:

Definition at line 92 of file test_packages.py.

00092 
00093     def testSearch(self):
00094         package = PackagePages(self.request.rootpage.page_name, self.request)
00095         assert package.searchpackage(self.request, "title:BadCon") == [u'BadContent']

Here is the call graph for this function:


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