@@ -229,29 +229,13 @@ def mock_run(
229229def mock_create_test_suite_run_response (
230230 request : requests .Request ,
231231 context : requests_mock .response ._Context ,
232- ) -> _api .TestSuiteRunSummary :
232+ ) -> _api .TestSuiteRunPendingSummary :
233233 request_body : _api .CreateTestSuiteRunRequest = request .json ()
234234 return {
235235 'run_id' : MOCK_RUN_ID ,
236236 'suite_id' : MOCK_SUITE_ID ,
237237 'branch' : request_body .get ('branch' ),
238238 'commit' : request_body .get ('commit' ),
239- 'start_time' : request_body ['start_time' ],
240- 'end_time' : request_body ['end_time' ],
241- 'num_tests' : len (request_body ['test_runs' ]),
242- 'num_pass' : len (
243- [run for run in request_body ['test_runs' ] if
244- all ([attempt ['result' ] == 'pass' for attempt in run ['attempts' ]])]),
245- 'num_fail' : len (
246- [run for run in request_body ['test_runs' ] if
247- all ([attempt ['result' ] == 'fail' for attempt in run ['attempts' ]])]),
248- 'num_flake' : len (
249- [run for run in request_body ['test_runs' ] if
250- any ([attempt ['result' ] == 'pass' for attempt in run ['attempts' ]]) and any (
251- [attempt ['result' ] == 'fail' for attempt in run ['attempts' ]])]),
252- 'num_quarantined' : len (
253- [run for run in request_body ['test_runs' ] if
254- all ([attempt ['result' ] == 'quarantined' for attempt in run ['attempts' ]])]),
255239 }
256240
257241
@@ -524,20 +508,6 @@ def run_test_case(
524508 create_test_suite_run_request .json ()
525509 )
526510
527- assert_regex (TIMESTAMP_REGEX , create_test_suite_run_body ['start_time' ])
528- assert_regex (TIMESTAMP_REGEX , create_test_suite_run_body ['end_time' ])
529-
530- actual_test_runs = {
531- (test_run_record ['filename' ], tuple (test_run_record ['name' ])): [
532- attempt ['result' ] for attempt in test_run_record ['attempts' ]
533- ]
534- for test_run_record in create_test_suite_run_body ['test_runs' ]
535- }
536- assert actual_test_runs == expected_uploaded_test_runs
537-
538- # Make sure there aren't any duplicate test keys.
539- assert len (create_test_suite_run_body ['test_runs' ]) == len (actual_test_runs )
540-
541511 if expected_commit is not None :
542512 assert create_test_suite_run_body ['commit' ] == expected_commit
543513 else :
0 commit comments