def setUp(self): """Before each test...""" # Connect to test db connect_to_db(s.app, "postgresql:///testdb", False) # Create tables and add sample data db.create_all() db.session.commit() sample_data()
def setUp(self): """Before each test...""" # Connect to test db connect_to_db(s.app, "postgresql:///testdb", False) # If we stop a test midway, let's make sure there's nothing in the db # on the next start up. db.reflect() db.drop_all() # Create tables and add sample data db.create_all() db.session.commit() sample_data()