def setUp(self): # create a traced engine with the given arguments # and configure the current PIN instance patch() dsn = 'postgresql://%(user)s:%(password)s@%(host)s:%(port)s/%(dbname)s' % POSTGRES_CONFIG self.engine = sqlalchemy.create_engine(dsn) self.tracer = get_dummy_tracer() Pin.override(self.engine, tracer=self.tracer) # prepare a connection self.conn = self.engine.connect()
def setUp(self): super(SQLAlchemyPatchTestCase, self).setUp() # create a traced engine with the given arguments # and configure the current PIN instance patch() dsn = "postgresql://%(user)s:%(password)s@%(host)s:%(port)s/%(dbname)s" % POSTGRES_CONFIG self.engine = sqlalchemy.create_engine(dsn) Pin.override(self.engine, tracer=self.tracer) # prepare a connection self.conn = self.engine.connect()