def __init__(self, client_id): self.client_id = client_id self.terminated = False self.send = mock.MagicMock() self.authenticated_userid = None self.effective_principals = [security.Everyone, "group:__world__"] self.registry = registry.Registry("streamer_test") self.registry.settings = {"h.app_url": "http://streamer"} self.send_json_payloads = []
def begin(self): if self.should_use_tx: self.tx = self.conn.begin() self.session.configure(bind=self.conn) reg = registry.Registry(name='ftesting') self.configurator = testing.setUp(registry=reg)