def setUp(self): reactor.suggestThreadPoolSize(1) connection_string = os.environ.get( "SHORTENER_TEST_CONNECTION_STRING", "sqlite://") self.engine = get_engine( connection_string, reactor=FakeReactorThreads()) self._drop_tables() self.conn = self.successResultOf(self.engine.connect())
def setUp(self): reactor.suggestThreadPoolSize(1) connection_string = os.environ.get("SHORTENER_TEST_CONNECTION_STRING", "sqlite://") self.engine = get_engine(connection_string, reactor=FakeReactorThreads()) self._drop_tables() self.conn = self.successResultOf(self.engine.connect())
def __init__(self, reactor, config): self.config = config self.engine = get_engine(config['connection_string'], reactor) self.metrics = ShortenerMetrics(reactor, config) self.load_handlers()
def setUp(self): self.engine = get_engine("sqlite://", reactor=FakeReactorThreads()) self.conn = self.successResultOf(self.engine.connect())