Ejemplo n.º 1
0
 def test_get_files_for_workflow(self):
     create_workflow_file_in_dir(self.test_cache_file_path)
     c = CF(working_directory=self.temp_dir)
     c.add_result('workflowA', 'fileA', {'columnA': 'dataA'})
     c.add_result('workflowA', 'fileB', {'columnA': 'dataB'})
     c.add_result('workflowF', 'fileA', {'columnA': 'dataC'})
     c.add_result('workflowF', 'fileQ', {'columnA': 'dataD'})
     files_in_workflow = c.get_files_for_workflow('workflowA')
     self.assertIsInstance(files_in_workflow, dict)
     self.assertEqual(2, len(files_in_workflow))
     self.assertListEqual(['fileA', 'fileB'],
                          list(files_in_workflow.keys()))
Ejemplo n.º 2
0
 def test_get_files_for_empty_workflow(self):
     create_workflow_file_in_dir(self.test_cache_file_path)
     c = CF(working_directory=self.temp_dir)
     files_in_workflow = c.get_files_for_workflow('workflowA')
     self.assertIsInstance(files_in_workflow, dict)
     self.assertEqual(0, len(files_in_workflow))