Пример #1
0
    def test_default_role_translation_for_default_workflows(self, browser):
        document = create(Builder('document'))
        sharing.visit(document)

        self.assertEquals(
            ['Can add', 'Can edit', 'Can review', 'Can view'],
            sharing.role_labels())
Пример #2
0
    def test_default_role_translation_for_default_workflows(self, browser):
        document = create(Builder('document'))
        sharing.visit(document)

        self.assertEquals(
            ['Can add', 'Can edit', 'Can review', 'Can view'],
            sharing.role_labels())
Пример #3
0
    def test_custom_role_translation_per_workflow(self, browser):
        applyProfile(self.portal, 'ftw.lawgiver.tests:role-translation')
        wftool = getToolByName(self.portal, 'portal_workflow')
        wftool.setChainForPortalTypes(['Document'], 'role-translation')

        document = create(Builder('document'))
        sharing.visit(document)

        self.assertEquals(['Can add', 'Can view', 'editor', 'editor-in-chief'],
                          sharing.role_labels())
Пример #4
0
    def test_custom_role_translation_per_workflow(self, browser):
        applyProfile(self.portal, 'ftw.lawgiver.tests:role-translation')
        wftool = getToolByName(self.portal, 'portal_workflow')
        wftool.setChainForPortalTypes(['Document'], 'role-translation')

        document = create(Builder('document'))
        sharing.visit(document)

        self.assertEquals(
            ['Can add', 'Can view', 'editor', 'editor-in-chief'],
            sharing.role_labels())