def testRunWithError(self): collector = DataCollector(in_path=IN_FILE_BAD, ot_path_data=OT_FILE_DATA, ot_path_doc=OT_FILE_DOC) collector.run() df = pd.read_csv(OT_FILE_DATA) self.assertEqual(len(df["Biomodel_Id"]), 3)
class TestDataCollector(unittest.TestCase): def setUp(self): self.collector = DataCollector(in_path=IN_FILE, ot_path_data=OT_FILE_DATA, ot_path_doc=OT_FILE_DOC) def testConstructor(self): if IGNORE_TEST: return self.assertEqual(self.collector._ot_path_data, OT_FILE_DATA) def testRun(self): self.collector.run() df = pd.read_csv(OT_FILE_DATA) self.assertEqual(len(df["Biomodel_Id"]), 2) def testRunWithError(self): collector = DataCollector(in_path=IN_FILE_BAD, ot_path_data=OT_FILE_DATA, ot_path_doc=OT_FILE_DOC) collector.run() df = pd.read_csv(OT_FILE_DATA) self.assertEqual(len(df["Biomodel_Id"]), 3)