def test_create_location_without_locations_model(self): """ Test a user cannot create a location without location relation """ db_session.remove() with engine.begin() as conn: conn.execute("DROP TABLE locations CASCADE") CommonTestCases.admin_token_assert_in(self, create_location_query, "does not exist")
def shutdown_session(exception=None): db_session.remove()
def tearDown(self): app = self.create_app() with app.app_context(): db_session.remove() Base.metadata.drop_all(bind=engine)
def tearDown(self): app = self.create_app() with app.app_context(): command.stamp(self.alembic_configuration, 'base') db_session.remove() Base.metadata.drop_all(bind=engine)