def setUp(self): transaction.begin() self._policy = PermissiveSecurityPolicy() self._oldPolicy = setSecurityPolicy(self._policy) self.connection = Zope2.DB.open() self.root = self.connection.root()['Application'] newSecurityManager(None, AnonymousUser().__of__(self.root))
def setUp(self): try: import Zope2 as Zope except ImportError: import Zope if hasattr(Zope, 'startup'): Zope.startup() try: from transaction import begin except ImportError: get_transaction().begin() else: begin() self._policy = PermissiveSecurityPolicy() self._oldPolicy = setSecurityPolicy(self._policy) self.connection = Zope.DB.open() self.root = self.connection.root()['Application'] newSecurityManager(None, OmnipotentUser().__of__(self.root))
def setUp(self): TransactionalTest.setUp(self) self._policy = PermissiveSecurityPolicy() self._oldPolicy = setSecurityPolicy(self._policy) newSecurityManager(None, AnonymousUser().__of__(self.app.acl_users))
def setUp(self): transaction.begin() self._policy = PermissiveSecurityPolicy() self._oldPolicy = setSecurityPolicy(self._policy) self.app = self.root = ZopeTestCase.app() newSecurityManager(None, AnonymousUser().__of__(self.app.acl_users))