def test_write_lci_excel_complicated(setup): fp = write_lci_excel("example") given = ExcelExtractor.extract(fp)[0][1] expected = ExcelExtractor.extract( os.path.join(EXCEL_FIXTURES_DIR, "export-complicated.xlsx") )[0][1] assert given == expected
def test_write_lci_excel_rich_data_skipped(): Database("foo").write({ ("foo", "a"): { 'this': { "should": "be skipped" }, "name": "bar", "exchanges": [] } }) fp = write_lci_excel("foo") given = ExcelExtractor.extract(fp)[0][1] expected = [['Database', 'foo'], [None, None], ['Activity', 'bar'], ['code', 'a'], ['id', 1], ['Exchanges', None]] assert given == expected