예제 #1
0
    def kill_database():
        empty_database(engine, session)

        from backend.database import startup

        monkeypatch.setattr(startup, 'stored_session', None)
        monkeypatch.setattr(startup, 'stored_redis', None)
        monkeypatch.setattr(startup, 'redis_attempted', False)
예제 #2
0
    def test_clear_database(self, engine):
        match = self.session.query(PlayerGame).filter(
            PlayerGame.game == self.guid).first()
        assert (match is not None)
        empty_database(engine)

        match = self.session.query(PlayerGame).filter(
            PlayerGame.game == self.guid).first()
        assert (match is None)
예제 #3
0
 def kill_database():
     engine, session = EngineStartup.login_db()
     empty_database(engine, session)