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

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

src/f/t/ftw.permissionmanager-2.1.1/ftw/permissionmanager/tests/test_copy_permissions.py   ftw.permissionmanager(Download)
from zope.component import getMultiAdapter
from ftw.permissionmanager.testing import (
    FTW_PERMISSIONMANAGER_INTEGRATION_TESTING,
    TEST_USER_ID_2, TEST_GROUP_ID, TEST_GROUP_ID_2)
import unittest2 as unittest
        # Set up two groups
        portal.portal_groups.addGroup(TEST_GROUP_ID)
        portal.portal_groups.addGroup(TEST_GROUP_ID_2)
        # Add local roles
        portal.folder1.manage_addLocalRoles(TEST_GROUP_ID, ['Contributor', ])
        # Choose target user
        self.browser.getControl(
            name="search_target_user").value = TEST_GROUP_ID_2
        self.browser.getControl(name="submit").click()
        self.assertIn(
 
        for id_, roles in dict(portal.folder1.get_local_roles()).items():
            if id_ == TEST_GROUP_ID_2:
                break
        self.assertIn('Contributor', roles)
        results = dict(portal.folder1.folder2.get_local_roles()).items()
        for id_, roles in results:
            if id_ == TEST_GROUP_ID_2: