def clean_database_if_local():
    if DATABASE_URL in LOCAL_DATABASE_URL:
        clean_database()
        clean_views()
        drop_offerer_cultural_activity_table()
        drop_regions_departments_table()
        drop_offerer_humanized_id_table()
        logger.info("[CLEAN DATABASE AND VIEW] Database cleaned")
        return
    logger.info("[CLEAN DATABASE AND VIEW] Cannot clean production database")
 def teardown_method(self):
     clean_database()
     clean_views()
Beispiel #3
0
 def teardown_method(self):
     clean_database()
     clean_views()
     drop_offerer_cultural_activity_table()
Beispiel #4
0
 def setup_class(self):
     clean_database()
     clean_views()
Beispiel #5
0
 def setup_method(self):
     clean_database()
     clean_views()