Exemple #1
0
def clean_db():
    with session_scope() as dao_sess:
        stat_call_on_queue_dao.clean_table(dao_sess)
        stat_agent_periodic_dao.clean_table(dao_sess)
        stat_queue_periodic_dao.clean_table(dao_sess)
        stat_agent_dao.clean_table(dao_sess)
        stat_queue_dao.clean_table(dao_sess)
Exemple #2
0
    def test_clean_table(self):
        self._insert_queue('queue1')

        stat_queue_dao.clean_table(self.session)

        self.assertTrue(self.session.query(StatQueue).first() is None)
Exemple #3
0
def clean_db():
    stat_call_on_queue_dao.clean_table(dao_sess)
    stat_agent_periodic_dao.clean_table(dao_sess)
    stat_queue_periodic_dao.clean_table(dao_sess)
    stat_agent_dao.clean_table(dao_sess)
    stat_queue_dao.clean_table(dao_sess)