def setUp(self): try: os.makedirs(self.temp_dir) except: pass delete_index() init_search() db.drop_all() db.create_all() create_system_roles()
def setUp(self): if not hasattr(TestCase, '_global_test_state'): TestCase._global_test_state = True delete_index() upgrade_search() else: indexes = [collection_index(), entity_index(), record_index()] es.delete_by_query(index=indexes, body={'query': { 'match_all': {} }}, refresh=True, conflicts='proceed') db.drop_all() db.create_all() create_system_roles()
def setUp(self): delete_index() upgrade_search() db.drop_all() db.create_all() create_system_roles()