Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.content.browser.tests.test_doctests.FolderTestCase Class Reference
Inheritance diagram for plone.app.content.browser.tests.test_doctests.FolderTestCase:
Inheritance graph
[legend]
Collaboration diagram for plone.app.content.browser.tests.test_doctests.FolderTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def createDocuments
def createFolder
def loginAsManager

Public Attributes

 browser
 uf

Detailed Description

base test case with convenience methods for all control panel tests

Definition at line 14 of file test_doctests.py.


Member Function Documentation

Definition at line 17 of file test_doctests.py.

00017 
00018     def afterSetUp(self):
00019         super(FolderTestCase, self).afterSetUp()
00020         from Products.Five.testbrowser import Browser
00021         self.browser = Browser()
00022         
00023         self.uf = self.portal.acl_users
00024         self.uf.userFolderAddUser('root', 'secret', ['Manager'], [])

Definition at line 25 of file test_doctests.py.

00025 
00026     def createDocuments(self, amount):
00027         self.setRoles(['Manager',])
00028         for i in xrange(1, amount + 1):
00029             self.portal.invokeFactory(id='testing-%d' % i, type_name='Document')
00030             document = getattr(self.portal, 'testing-%d' % i)
00031             document.setTitle('Testing %d' % i)
00032             document.setExcludeFromNav(True)
00033             document.reindexObject()

Here is the call graph for this function:

Definition at line 34 of file test_doctests.py.

00034 
00035     def createFolder(self, id='new-folder'):
00036         self.setRoles(['Manager',])
00037         self.portal.invokeFactory(id=id, type_name='Folder')
00038         folder = getattr(self.portal, id)
00039         folder.setTitle('New Folder')
00040         folder.setExcludeFromNav(True)
00041         folder.reindexObject()
00042         

Here is the call graph for this function:

points the browser to the login screen and logs in as user root with Manager role.

Definition at line 43 of file test_doctests.py.

00043 
00044     def loginAsManager(self):
00045         """points the browser to the login screen and logs in as user root with Manager role."""
00046         self.browser.open('http://nohost/plone/')
00047         self.browser.getLink('Log in').click()
00048         self.browser.getControl('Login Name').value = 'root'
00049         self.browser.getControl('Password').value = 'secret'
00050         self.browser.getControl('Log in').click()


Member Data Documentation

Definition at line 20 of file test_doctests.py.

Definition at line 22 of file test_doctests.py.


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