# A test for the hacky workaround class I made that imitates the CSV-reader-interface when passed a list[list[str]] # as we get from the Google Sheets API from app.routers.seed import CSVFacade def test_csv_facade(): facade = CSVFacade([["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"]]) for i, row in enumerate(facade): if i == 0: assert row == {"a": "1", "b": "2", "c": "3"} elif i == 1: assert row == {"a": "4", "b": "5", "c": "6"} else: raise ValueError(f"Expected 2 rows, but got {i+1}")