Skip to content

Commit

Permalink
fix siteadmin role test to not use ancient test frameworks and FIX pl…
Browse files Browse the repository at this point in the history
…one 4.x test compatibility on this branch.
  • Loading branch information
thet committed Feb 14, 2014
1 parent 7d6bc84 commit 60f975d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 33 deletions.
33 changes: 0 additions & 33 deletions plone/app/event/at/tests/testSiteAdminRole.py

This file was deleted.

21 changes: 21 additions & 0 deletions plone/app/event/at/tests/test_siteadmin_role.py
@@ -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))

0 comments on commit 60f975d

Please sign in to comment.