def test_assert_in_progress_resource_models_set(): with pytest.raises(AssertionError): ResourceClient.assert_in_progress(OperationStatus.IN_PROGRESS, {"resourceModels": []})
def test_assert_in_progress_error_code_set(): with pytest.raises(AssertionError): ResourceClient.assert_in_progress( OperationStatus.IN_PROGRESS, {"errorCode": HandlerErrorCode.AccessDenied.value}, )
def test_assert_in_progress_callback_delay_seconds_set(): callback_delay_seconds = ResourceClient.assert_in_progress( OperationStatus.IN_PROGRESS, {"callbackDelaySeconds": 5}) assert callback_delay_seconds == 5
def test_assert_in_progress_wrong_status(status): with pytest.raises(AssertionError): ResourceClient.assert_in_progress(status, {})
def test_assert_in_progress_callback_delay_seconds_unset(): callback_delay_seconds = ResourceClient.assert_in_progress( OperationStatus.IN_PROGRESS, {"resourceModels": None}) assert callback_delay_seconds == 0