Пример #1
0
 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")
Пример #2
0
 def shutdown_session(exception=None):
     db_session.remove()
Пример #3
0
 def tearDown(self):
     app = self.create_app()
     with app.app_context():
         db_session.remove()
         Base.metadata.drop_all(bind=engine)
Пример #4
0
 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)