Back to index

plone3  3.1.7
Public Member Functions
CMFPlone.tests.testBrowserDefaultScripts.TestBrowserDefaultScripts Class Reference
Inheritance diagram for CMFPlone.tests.testBrowserDefaultScripts.TestBrowserDefaultScripts:
Inheritance graph
Collaboration diagram for CMFPlone.tests.testBrowserDefaultScripts.TestBrowserDefaultScripts:
Collaboration graph

List of all members.

Public Member Functions

def testNoIndexHtml
def testHasIndexHtml
def testGetSelectableViewsWithViews
def testGetSelectableViewsWithoutViews
def testSetDefaultPageWithoutPage
def testSetDefaultPageWithPage
def testGetViewTemplateId
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Detailed Description

Tests the browser default and folder-default page scripts

Definition at line 9 of file

Member Function Documentation

Definition at line 30 of file

00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file

00027     def setRequestMethod(self, method):
00028'REQUEST_METHOD', method)
00029 = method

Here is the caller graph for this function:

Definition at line 35 of file

00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038[name] = token

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 29 of file

00030     def testGetSelectableViewsWithoutViews(self):
00031         # Assume documents have only one view
00032         self.folder.invokeFactory('Document', 'test', 
00033                                   title='Test default page')
00034         doc = getattr(self.folder, 'test')
00035         self.failIf(doc.getSelectableViews())

Here is the call graph for this function:

Definition at line 22 of file

00023     def testGetSelectableViewsWithViews(self):
00024         # Assume folders have at least two possible views to chose from
00025         views = [v[0] for v in self.folder.getSelectableViews()]
00026         self.failUnless(views)
00027         self.failUnless('folder_listing' in views)
00028         self.failUnless('atct_album_view' in views)

Definition at line 48 of file

00049     def testGetViewTemplateId(self):
00050         self.folder.setLayout('atct_album_view')
00051         self.assertEqual(self.folder.getViewTemplateId(), 'atct_album_view')

Definition at line 16 of file

00017     def testHasIndexHtml(self):
00018         # Make sure we can determine if a container contains a index_html object
00019         self.folder.invokeFactory('Document', 'index_html', 
00020                                   title='Test index')
00021         self.failUnless(self.folder.hasIndexHtml())

Definition at line 12 of file

00013     def testNoIndexHtml(self):
00014         # A folder shouldn't have an index_html object at instantiation time
00015         self.failIf(self.folder.hasIndexHtml())

Definition at line 36 of file

00037     def testSetDefaultPageWithoutPage(self):
00038         # Make sure we can't define a default page if no object in folder
00039         self.failUnless(self.folder.canSelectDefaultPage())

Definition at line 40 of file

00041     def testSetDefaultPageWithPage(self):
00042         # Make sure we can define a Document as default page
00043         self.folder.invokeFactory('Document', 'test', 
00044                                   title='Test default page')
00045         self.failUnless(self.folder.canSelectDefaultPage())
00046         self.folder.saveDefaultPage('test')
00047         self.failUnless(self.folder.test.isDefaultPageInFolder())

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