def __init__(self, db, user=RootUser("root")): self.db = db self.tm = None self.request = None self.old_request = None self.old_db = None self.old_user = None self.old_tm = None self.user = user self._active_txn = None
def __init__(self, db, user=RootUser("root")): self.db = db self.tm = db.get_transaction_manager() self.request = get_mocked_request() self.user = user self._active_txn = None
def set_root_user(self, user): password = user['password'] if password: password = hash_password(password) self.root_user = RootUser(password)
def __init__(self, request, user=RootUser('foobar')): self.principal = user self.interaction = None
def login(request, user=RootUser('foobar')): request.security = Interaction(request) request.security.add(TestParticipation(request, user)) request.security.invalidate_cache() request._cache_groups = {}
def login(*, user=RootUser('foobar')): set_authenticated_user(user)