@@ -161,7 +161,6 @@ def test_get_issue(mocked_responses, action_context_factory, capturelogs):
161161
162162 assert response == mock_response_data
163163 for record in capturelogs .records :
164- assert record .rid == context .rid
165164 assert record .action ["whiteboard_tag" ] == context .action .whiteboard_tag
166165
167166 before , after = capturelogs .messages
@@ -179,9 +178,6 @@ def test_get_issue_handles_404(mocked_responses, action_context_factory, capture
179178
180179 assert return_val is None
181180
182- for record in capturelogs .records :
183- assert record .rid == context .rid
184-
185181 before , after = capturelogs .records
186182 assert before .levelno == logging .DEBUG
187183 assert before .message == "Getting issue JBI-234"
@@ -202,7 +198,6 @@ def test_get_issue_reraises_other_erroring_status_codes(
202198 jira .get_service ().get_issue (context = context , issue_key = "JBI-234" )
203199
204200 [record ] = capturelogs .records
205- assert record .rid == context .rid
206201 assert record .levelno == logging .DEBUG
207202 assert record .message == "Getting issue JBI-234"
208203
@@ -223,10 +218,6 @@ def test_update_issue_resolution(mocked_responses, action_context_factory, captu
223218 context = context , jira_resolution = "DONEZO"
224219 )
225220
226- for record in capturelogs .records :
227- assert record .rid == context .rid
228- assert record .levelno == logging .DEBUG
229-
230221 before , after = capturelogs .messages
231222 assert before == "Updating resolution of Jira issue JBI-234 to DONEZO"
232223 assert after == "Updated resolution of Jira issue JBI-234 to DONEZO"
@@ -252,10 +243,8 @@ def test_update_issue_resolution_raises(
252243 context = context , jira_resolution = "DONEZO"
253244 )
254245
255- [record ] = capturelogs .records
256- assert record .rid == context .rid
257- assert record .levelno == logging .DEBUG
258- assert record .message == "Updating resolution of Jira issue JBI-234 to DONEZO"
246+ [message ] = capturelogs .messages
247+ assert message == "Updating resolution of Jira issue JBI-234 to DONEZO"
259248
260249
261250def test_create_jira_issue (mocked_responses , action_context_factory , capturelogs ):
@@ -287,10 +276,6 @@ def test_create_jira_issue(mocked_responses, action_context_factory, capturelogs
287276
288277 assert response == mocked_response_data
289278
290- for record in capturelogs .records :
291- assert record .rid == context .rid
292- assert record .levelno == logging .DEBUG
293-
294279 before , after = capturelogs .records
295280 assert before .message == f"Creating new Jira issue for Bug { context .bug .id } "
296281 assert before .fields == issue_fields
@@ -333,12 +318,10 @@ def test_create_jira_issue_when_list_is_returned(
333318 before , after = capturelogs .records
334319 assert before .message == f"Creating new Jira issue for Bug { context .bug .id } "
335320 assert before .levelno == logging .DEBUG
336- assert before .rid == context .rid
337321 assert before .fields == issue_fields
338322
339323 assert after .message == f"Jira issue JBI-234 created for Bug { context .bug .id } "
340324 assert after .levelno == logging .DEBUG
341- assert after .rid == context .rid
342325 assert after .response == [mocked_issue_data ]
343326
344327
@@ -369,11 +352,9 @@ def test_create_jira_issue_returns_errors(
369352
370353 before , after = capturelogs .records
371354 assert before .message == f"Creating new Jira issue for Bug { context .bug .id } "
372- assert before .rid == context .rid
373355 assert before .levelno == logging .DEBUG
374356 assert before .fields == issue_fields
375357
376358 assert after .message == f"Failed to create issue for Bug { context .bug .id } "
377- assert after .rid == context .rid
378359 assert after .levelno == logging .ERROR
379360 assert after .response == fake_error_data
0 commit comments