@@ -82,15 +82,6 @@ def test_record_init(self, mocker):
8282 # validate key-value args (body)
8383 assert call_made [2 ]['body' ] == uniques
8484
85- httpclient .reset_mock ()
86- def raise_exception (* args , ** kwargs ):
87- raise client .HttpClientException ('some_message' )
88- httpclient .post .side_effect = raise_exception
89- with pytest .raises (APIException ) as exc_info :
90- response = telemetry_api .record_init (uniques )
91- assert exc_info .type == APIException
92- assert exc_info .value .message == 'some_message'
93-
9485 def test_record_stats (self , mocker ):
9586 """Test telemetry posting stats."""
9687 httpclient = mocker .Mock (spec = client .HttpClient )
@@ -224,15 +215,6 @@ async def post(verb, url, key, body, extra_headers):
224215 # validate key-value args (body)
225216 assert self .body == uniques
226217
227- httpclient .reset_mock ()
228- def raise_exception (* args , ** kwargs ):
229- raise client .HttpClientException ('some_message' )
230- httpclient .post = raise_exception
231- with pytest .raises (APIException ) as exc_info :
232- response = await telemetry_api .record_init (uniques )
233- assert exc_info .type == APIException
234- assert exc_info .value .message == 'some_message'
235-
236218 @pytest .mark .asyncio
237219 async def test_record_stats (self , mocker ):
238220 """Test telemetry posting unique keys."""
0 commit comments