Exemplo n.º 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")
Exemplo n.º 2
0
 def shutdown_session(exception=None):
     db_session.remove()
Exemplo n.º 3
0
 def tearDown(self):
     app = self.create_app()
     with app.app_context():
         db_session.remove()
         Base.metadata.drop_all(bind=engine)
Exemplo n.º 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)