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())
示例#3
0
 def __init__(self, reactor, config):
     self.config = config
     self.engine = get_engine(config['connection_string'], reactor)
     self.metrics = ShortenerMetrics(reactor, config)
     self.load_handlers()
示例#4
0
 def setUp(self):
     self.engine = get_engine("sqlite://", reactor=FakeReactorThreads())
     self.conn = self.successResultOf(self.engine.connect())
示例#5
0
 def __init__(self, reactor, config):
     self.config = config
     self.engine = get_engine(config['connection_string'], reactor)
     self.metrics = ShortenerMetrics(reactor, config)
     self.load_handlers()