Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix siteadmin role test to not use ancient test frameworks and FIX pl…
…one 4.x test compatibility on this branch.
- Loading branch information
Showing
2 changed files
with
21 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from AccessControl.PermissionRole import rolesForPermissionOn | ||
from plone.app.event.testing import PAEventAT_INTEGRATION_TESTING | ||
|
||
import unittest2 as unittest | ||
|
||
|
||
class TestSiteAdministratorRole(unittest.TestCase): | ||
layer = PAEventAT_INTEGRATION_TESTING | ||
|
||
def setUp(self): | ||
self.portal = self.layer['portal'] | ||
|
||
def test_expected_permissions(self): | ||
"""This integration test shows that the correct permissions were | ||
assigned to the Site Administrator role (whether inherited from the | ||
Zope application, or specified in the portal rolemap). | ||
""" | ||
site = self.portal | ||
perm = 'Add portal events' | ||
role = 'Site Administrator' | ||
self.assertTrue(role in rolesForPermissionOn(perm, site)) |