diff --git a/tests/foreman/api/test_repository.py b/tests/foreman/api/test_repository.py index 9b908dbada9..6b60caba0dd 100644 --- a/tests/foreman/api/test_repository.py +++ b/tests/foreman/api/test_repository.py @@ -1406,7 +1406,7 @@ def test_positive_bulk_cancel_sync(self, target_sat, module_entitlement_manifest time.sleep(30) target_sat.api.ForemanTask().bulk_cancel(data={"task_ids": sync_ids[5:]}) for sync_id in sync_ids: - sync_result = target_sat.api.ForemanTask(id=sync_id).poll(canceled=True) + sync_result = target_sat.api.ForemanTask(id=sync_id).poll(must_succeed=False) assert ( 'Task canceled' in sync_result['humanized']['errors'] or 'No content added' in sync_result['humanized']['output'] @@ -1667,7 +1667,7 @@ def test_positive_cancel_docker_repo_sync(self, repo, target_sat): # Need to wait for sync to actually start up time.sleep(2) target_sat.api.ForemanTask().bulk_cancel(data={"task_ids": [sync_task['id']]}) - sync_task = target_sat.api.ForemanTask(id=sync_task['id']).poll(canceled=True) + sync_task = target_sat.api.ForemanTask(id=sync_task['id']).poll(must_succeed=False) assert 'Task canceled' in sync_task['humanized']['errors'] assert 'No content added' in sync_task['humanized']['output']