-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from plone/python3
More python 3 issues
- Loading branch information
Showing
31 changed files
with
355 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
from Products.CMFCore.permissions import setDefaultRoles | ||
from AccessControl.Permission import addPermission | ||
|
||
AddGroups = 'Add Groups' | ||
setDefaultRoles(AddGroups, ('Manager',)) | ||
addPermission(AddGroups, default_roles=('Manager',)) | ||
|
||
ManageGroups = 'Manage Groups' | ||
setDefaultRoles(ManageGroups, ('Manager',)) | ||
addPermission(ManageGroups, default_roles=('Manager',)) | ||
|
||
ViewGroups = 'View Groups' | ||
setDefaultRoles(ViewGroups, ('Manager', 'Owner', 'Member')) | ||
addPermission(ViewGroups, default_roles=('Manager', 'Owner', 'Member')) | ||
|
||
DeleteGroups = 'Delete Groups' | ||
setDefaultRoles(DeleteGroups, ('Manager', )) | ||
addPermission(DeleteGroups, default_roles=('Manager', )) | ||
|
||
SetGroupOwnership = 'Set Group Ownership' | ||
setDefaultRoles(SetGroupOwnership, ('Manager', 'Owner')) | ||
addPermission(SetGroupOwnership, default_roles=('Manager', 'Owner')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# -*- coding: utf-8 -*- | ||
from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE | ||
from plone.app.testing import setRoles | ||
from plone.app.testing import TEST_USER_ID | ||
from plone.app.testing import applyProfile | ||
from plone.app.testing import FunctionalTesting | ||
from plone.app.testing import IntegrationTesting | ||
from plone.app.testing import PloneSandboxLayer | ||
from plone.testing import z2 | ||
|
||
import Products.PlonePAS | ||
|
||
|
||
class ProductsPlonepasLayer(PloneSandboxLayer): | ||
|
||
defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,) | ||
|
||
def setUpZope(self, app, configurationContext): | ||
# Load any other ZCML that is required for your tests. | ||
# The z3c.autoinclude feature is disabled in the Plone fixture base | ||
# layer. | ||
self.loadZCML(package=Products.PlonePAS) | ||
z2.installProduct(app, 'Products.PlonePAS') | ||
|
||
def setUpPloneSite(self, portal): | ||
applyProfile(portal, 'Products.PlonePAS:PlonePAS') | ||
# setRoles(portal, TEST_USER_ID, ['Manager']) | ||
from Products.CMFPlone.utils import _createObjectByType | ||
_createObjectByType('Folder', portal, id='Members') | ||
mtool = portal.portal_membership | ||
if not mtool.getMemberareaCreationFlag(): | ||
mtool.setMemberareaCreationFlag() | ||
mtool.createMemberArea(TEST_USER_ID) | ||
if mtool.getMemberareaCreationFlag(): | ||
mtool.setMemberareaCreationFlag() | ||
|
||
_createObjectByType('Folder', portal, id='folder') | ||
|
||
|
||
PRODUCTS_PLONEPAS_FIXTURE = ProductsPlonepasLayer() | ||
|
||
|
||
PRODUCTS_PLONEPAS_INTEGRATION_TESTING = IntegrationTesting( | ||
bases=(PRODUCTS_PLONEPAS_FIXTURE,), | ||
name='ProductsPlonepasLayer:IntegrationTesting', | ||
) | ||
|
||
|
||
PRODUCTS_PLONEPAS_FUNCTIONAL_TESTING = FunctionalTesting( | ||
bases=(PRODUCTS_PLONEPAS_FIXTURE,), | ||
name='ProductsPlonepasLayer:FunctionalTesting', | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.