Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/f/t/ftw.permissionmanager-2.1.1/ftw/permissionmanager/tests/test_sharing.py   ftw.permissionmanager(Download)
from ftw.permissionmanager.testing import FTW_PERMISSIONMANAGER_INTEGRATION_TESTING, TEST_USER_ID_2
import unittest2 as unittest
from plone.app.testing import TEST_USER_NAME, TEST_USER_ID, login, logout
from ftw.permissionmanager.browser.sharing import SharingView
 
    def test_has_manager_role(self):
        """TEST_USER_ID has manager role from testsetup"""
        portal = self.layer['portal']
        view = SharingView(portal.folder1, portal.folder1.REQUEST)
        self.assertTrue(view.has_manage_portal())
 
    def test_has_local_role(self):
        portal = self.layer['portal']
        view = SharingView(portal.folder1, portal.folder1.REQUEST)
    def test_role_settings(self):
        """TEST_USER_ID should be Contributor"""
        portal = self.layer['portal']
        view = SharingView(portal.folder1, portal.folder1.REQUEST)
        for entry in view.role_settings():