@@ -128,7 +128,7 @@ def test_get_and_update_historic_usage_success(self):
128128 # Mock API response
129129 api_response = {
130130 "download_links" : [
131- "https://example.com/org_history_api_response .json"
131+ "https://example.com/organisation_history_api_response .json"
132132 ]
133133 # There are other fields in the API response, but we don't need them for this test
134134 }
@@ -163,15 +163,15 @@ def test_get_and_update_historic_usage_success(self):
163163 s3 .put_object .assert_called_once ()
164164 args , kwargs = s3 .put_object .call_args
165165 assert kwargs ["Bucket" ].endswith ("copilot-usage-dashboard" )
166- assert kwargs ["Key" ] == "org_history .json"
166+ assert kwargs ["Key" ] == "organisation_history .json"
167167 assert json .loads (kwargs ["Body" ].decode ("utf-8" )) == result
168168
169169 def test_get_and_update_historic_usage_no_existing_data (self , caplog ):
170170 s3 = MagicMock ()
171171 gh = MagicMock ()
172172 api_response = {
173173 "download_links" : [
174- "https://example.com/org_history_api_response .json"
174+ "https://example.com/organisation_history_api_response .json"
175175 ]
176176 }
177177 fetched_usage_data = {"day_totals" : [
@@ -194,7 +194,7 @@ def test_get_and_update_historic_usage_no_existing_data(self, caplog):
194194 assert dates_added == ["2024-01-01" ]
195195 s3 .put_object .assert_called_once ()
196196 assert any (
197- "Error getting org_history .json" in record .getMessage ()
197+ "Error getting organisation_history .json" in record .getMessage ()
198198 for record in caplog .records
199199 )
200200
@@ -203,7 +203,7 @@ def test_get_and_update_historic_usage_no_new_dates(self):
203203 gh = MagicMock ()
204204 api_response = {
205205 "download_links" : [
206- "https://example.com/org_history_api_response .json"
206+ "https://example.com/organisation_history_api_response .json"
207207 ]
208208 }
209209 fetched_usage_data = {"day_totals" : [
@@ -230,7 +230,7 @@ def test_write_data_locally_creates_file(self, tmp_path):
230230 gh = MagicMock ()
231231 api_response = {
232232 "download_links" : [
233- "https://example.com/org_history_api_response .json"
233+ "https://example.com/organisation_history_api_response .json"
234234 ]
235235 }
236236 fetched_usage_data = {"day_totals" : [
0 commit comments