@@ -151,11 +151,10 @@ async def test_v2_locations_id(self, mock_datetime):
151151 ({"source" : "jhu" , "country_code" : "US" }, 404 ),
152152 ],
153153)
154- async def test_locations_status_code (query_params , expected_status ):
155- api_client = TestClient (APP )
154+ async def test_locations_status_code (async_api_client , query_params , expected_status ):
156155 async with mock_client_session () as mocked_client_session :
157156 mocked_client_session .get = mocked_session_get
158- response = await api_client .get ("/v2/locations" , query_string = query_params )
157+ response = await async_api_client .get ("/v2/locations" , query_string = query_params )
159158
160159 print (f"GET { response .url } \n { response } " )
161160 print (f"\t json:\n { pf (response .json ())[:1000 ]} \n \t ..." )
@@ -174,11 +173,10 @@ async def test_locations_status_code(query_params, expected_status):
174173 {"source" : "jhu" , "timelines" : True },
175174 ],
176175)
177- async def test_latest (query_params ):
178- api_client = TestClient (APP )
176+ async def test_latest (async_api_client , query_params ):
179177 async with mock_client_session () as mocked_client_session :
180178 mocked_client_session .get = mocked_session_get
181- response = await api_client .get ("/v2/latest" , query_string = query_params )
179+ response = await async_api_client .get ("/v2/latest" , query_string = query_params )
182180
183181 print (f"GET { response .url } \n { response } " )
184182
0 commit comments