def tearDown(self): os.remove('reasons.db') ma.get_actions_collection().drop() file_name = WorkflowInfo( self.request_base['workflows']).cache_filename('workflow_params') os.remove(file_name)
def tearDown(self): os.remove(sc.workflow_history_path()) if sc.workflow_history_path() != sc.all_errors_path(): os.remove(sc.all_errors_path()) for wkf in ge.check_session(None).return_workflows(): file_name = WorkflowInfo(wkf).cache_filename('workflow_params') os.remove(file_name) ge.check_session(None).teardown()
def setUp(self): rm.update_reasons(self.reasons1) if ma.get_actions_collection().count() != 0: print 'Test database not empty, abort!!' exit(123) file_name = WorkflowInfo( self.request_base['workflows']).cache_filename('workflow_params') dirname = os.path.dirname(file_name) if not os.path.exists(dirname): os.makedirs(dirname) with open(file_name, 'w') as cache: json.dump({}, cache)
def setUp(self): out_name = sc.all_errors_path() if not os.path.exists(os.path.dirname(out_name)): os.makedirs(os.path.dirname(out_name)) with open(sc.all_errors_path(), 'w') as output: json.dump(self.errors, output) if sc.workflow_history_path() != sc.all_errors_path(): uh.main(sc.all_errors_path()) ge.check_session(None).data_location = out_name ge.check_session(None).setup() for wkf in ge.check_session(None).return_workflows(): file_name = WorkflowInfo(wkf).cache_filename('workflow_params') dirname = os.path.dirname(file_name) if not os.path.exists(dirname): os.makedirs(dirname) with open(file_name, 'w') as cache: json.dump({}, cache)