@@ -107,20 +107,19 @@ def test_prepare_spreadsheet(self) -> None:
107
107
result = list (csv .DictReader (out ))
108
108
109
109
self .assertCountEqual (result , expected )
110
+
111
+
112
+ def test_read_spreadsheet_iso_numbers (self ) -> None :
113
+ url = "https://docs.google.com/spreadsheets/d/1eZOEYgts7d_-Dr-1oAbogPfzBLh6511b58pX3b59kvg" #CRE spreadsheet url
114
+ alias = "Test Spreadsheet"
115
+ result = read_spreadsheet (url , alias , validate = False , parse_numbered_only = False )
110
116
111
- # def get_spreadsheet_url(self) -> str:
112
- # """Helper function to retrieve the spreadsheet URL from an environment variable."""
113
- # return os.environ.get("TEST_SPREADSHEET_URL", "https://docs.google.com/spreadsheets/d/1IgfpPw5TCKSJ4eDlzfI9oNwVOZgtXQvWxSbC7SHE7Zg")
114
-
115
- # def test_read_spreadsheet_iso_numbers(self) -> None:
116
- # url = self.get_spreadsheet_url()
117
- # alias = "Test Spreadsheet"
118
- # result = read_spreadsheet(url, alias, validate=False, parse_numbered_only=False)
119
-
120
- # # Assuming the spreadsheet has a column "ISO Number" with values "7.10" and "8.20"
121
- # expected = [
122
- # {"ISO Number": "7.10", "Name": "Example 1", "Value": 10},
123
- # {"ISO Number": "8.20", "Name": "Example 2", "Value": 20}
124
- # ]
117
+ # Assuming the spreadsheet has a column "ISO Number" with values "7.10" and "8.20"
118
+ expected = [
119
+ {"ISO Number" : "7.10" , "Name" : "Example 1" , "Value" : 10 },
120
+ {"ISO Number" : "8.20" , "Name" : "Example 2" , "Value" : 20 }
121
+ ]
125
122
126
- # self.assertEqual(result["Sheet1"], expected)
123
+ self .assertEqual (result ["Sheet1" ], expected )
124
+
125
+
0 commit comments