Back to index

plone3  3.1.7
Public Member Functions
Archetypes.tests.test_cmfessentials.TestFTICopy Class Reference
Inheritance diagram for Archetypes.tests.test_cmfessentials.TestFTICopy:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.tests.test_cmfessentials.TestFTICopy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test6734

Detailed Description

Test for http://dev.plone.org/plone/ticket/6734: Cannot filter
Addable Types with folderish FTI in portal_types.

Definition at line 73 of file test_cmfessentials.py.


Member Function Documentation

Definition at line 78 of file test_cmfessentials.py.

00078 
00079     def test6734(self):
00080         self.loginAsPortalOwner()
00081 
00082         # We start off by copying the existing SimpleFolder type to
00083         # our own type 'MySimpleFolder'.  For this type, we set the
00084         # SimpleFolder type to be the sole allowed content type.
00085         types = self.portal.portal_types
00086         types.manage_pasteObjects(types.manage_copyObjects(['SimpleFolder']))
00087         types.manage_renameObjects(['copy_of_SimpleFolder'], ['MySimpleFolder'])
00088         my_type = types['MySimpleFolder']
00089         attrs = dict(allowed_content_types=('SimpleFolder',),
00090                      filter_content_types=True,
00091                      portal_type='MySimpleFolder',
00092                      title='MySimpleFolder')
00093         my_type.__dict__.update(attrs)
00094 
00095         browser = Browser()
00096         browser.addHeader('Authorization',
00097                           'Basic %s:%s' % ('portal_owner', user_password))
00098         browser.open(self.folder.absolute_url())
00099         browser.getLink('Add new').click()
00100         browser.getControl('MySimpleFolder').click()
00101         browser.getControl('Add').click()
00102 
00103         browser.getControl('Title').value = 'My dope folder'
00104         browser.getControl('Save').click()
00105         self.failUnless('Changes saved.' in browser.contents)
00106         self.failUnless('My dope folder' in browser.contents)
00107 

Here is the call graph for this function:


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