Example #1
0
    def tearDown(self):
        self.connection.rollback()
        self.connection2.rollback()

        drop_db(self.connection)
        self.connection.commit()
        self.connection.close()
        self.connection2.close()
Example #2
0
 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()
Example #3
0
 def tearDown(self):
     drop_db(self.connection)
     self.connection.commit()
     self.connection.close()
Example #4
0
 def setUp(self):
     self.connection = connect_test()
     drop_db(self.connection)
     create_db(self.connection)
     self.connection.commit()