def __init_data(self, data): query = """ INSERT INTO sales ( sales_date, sales_time, total_price, discount_price, discount_rate, inclusive_tax, exclusive_tax, deposit ) VALUES ( %s, %s, %s, %s, %s, %s, %s, %s ); """ db = PgAdapter() db.bulk_insert(query, data) db.commit()
def tearDown(self): query = """ TRUNCATE TABLE categories RESTART IDENTITY; """ db = PgAdapter() db.execute(query) db.commit()
def tearDown(self): self.db = PgAdapter() query = """ TRUNCATE TABLE items RESTART IDENTITY; """ self.db.execute(query) self.db.commit()
def __init_data(self): db = PgAdapter() db.execute_proc('create_test_data_categories') db.commit()
def setUp(self): self.db = PgAdapter() self.mapper = None self.teardown_query = ''
def setUp(self): self.mapper = CategoryMapper() self.db = PgAdapter()
def setUp(self): self.mapper = ItemMapper() self.db = PgAdapter()
def setUpClass(cls): cls.db = PgAdapter()
def setUp(self): self.mapper = SalesMapper() self.db = PgAdapter()
def tearDown(self): db = PgAdapter() db.execute_proc('cleanup_sales') db.commit()
def setUp(self): self.db = PgAdapter() self.endpoint = '' self.teardown_query = ''
def setUp(self): self.mapper = SalesMapper() self.db = PgAdapter() self.today = datetime.now()