def setUp(self):
        super(TestRaptusAutocompleteView, self).setUp()
        folder_1 = createObject(
            self.portal, 'Folder', 'test_folder_1', title='Folder 1',
            description='Some Folder 1 description - itsfolder',
            text='Some Folder 1 text', subject="Foo bar")
        self.folder_1 = folder_1

        document_1_folder_1 = createObject(
            folder_1, 'Document', 'test_doc_1_folder_1', title='A title doc 1 - testing very long title - longtitle',
            description='Some description of document 1 - itsdocument',
            text='Some text of document 1 from folder 1', subject="Foo rab 2")

        document_2_folder_1 = createObject(
            folder_1, 'Document', 'test_doc_2_folder_1', title='A title doc 2',
            description='Some description of document 2 - itsdocument',
            text='Some text of document 2 from folder 1', subject="Foo 3")
Exemplo n.º 2
0
    def test_turnOffLocalRolesInheritance(self):
        folder_1 = createObject(
            self.portal, 'Folder', 'test_folder_1', title='Folder 1',
            description='Some Folder 1 description - itsfolder',
            text='Some Folder 1 text')

        browser = self.login()
        browser.open(folder_1.absolute_url_path())
        self.assertFalse(hasattr(folder_1, '__ac_local_roles_block__'))
        turnOffLocalRolesInheritance(folder_1, None)
        self.assertTrue(hasattr(folder_1, '__ac_local_roles_block__'))