def test_fromCsvEntry_emptyEntryReturnsEmptyLineage(): entry = dict() actual = Lineage.from_csv_entry(entry) expected = Lineage() assert actual == expected
def test_fromCsvEntry_realEntryEntryReturnsLineage(): library = csv.DictReader(TEST_CASE_DIR.joinpath("test_library.csv").open()) entry = next(library) actual = Lineage.from_csv_entry(entry) expected = Lineage( species="M. tuberculosis", lineage="Lineage 1", sublineage="Sublineage 7", name="Indo_Oceanic", ) assert actual == expected