def tearDown(self): self.connection.rollback() self.connection2.rollback() drop_db(self.connection) self.connection.commit() self.connection.close() self.connection2.close()
def setUp(self): self.connection = connect_test() drop_db(self.connection) create_db(self.connection) user = User(name=self.name1, min_=0, max_=100, current=50) add_user(self.connection, user) user = User(name=self.name2, min_=0, max_=20, current=10) add_user(self.connection, user) self.connection.commit() self.connection2 = connect_test()
def tearDown(self): drop_db(self.connection) self.connection.commit() self.connection.close()
def setUp(self): self.connection = connect_test() drop_db(self.connection) create_db(self.connection) self.connection.commit()