def setUp(self):
     super(TestSecurityMapping, self).setUp()
     zope.component.provideUtility(Permission('zope.Foo', ''),
                                   IPermission, 'zope.Foo')
     defineRole("zope.Bar", '', '')
     principalRegistry.definePrincipal("zope.Blah", '', '')
     self.context = xmlconfig.file("mapping.zcml", zope.securitypolicy.tests)
 def _make_principal(self, id=None, title=None):
     p = principalRegistry.definePrincipal(
         id or 'APrincipal',
         title or 'A Principal')
     return p.id