def test_assert_in_progress_callback_delay_seconds_set(): callback_delay_seconds = HookClient.assert_in_progress( HookStatus.IN_PROGRESS, {"callbackDelaySeconds": 5}) assert callback_delay_seconds == 5
def test_assert_in_progress_callback_delay_seconds_unset(): callback_delay_seconds = HookClient.assert_in_progress( HookStatus.IN_PROGRESS, {"result": None}) assert callback_delay_seconds == 0
def test_assert_in_progress_error_code_set(): with pytest.raises(AssertionError): HookClient.assert_in_progress( HookStatus.IN_PROGRESS, {"errorCode": HandlerErrorCode.AccessDenied.value}, )
def test_assert_in_progress_result_set(): with pytest.raises(AssertionError): HookClient.assert_in_progress(HookStatus.IN_PROGRESS, {"result": ""})
def test_assert_in_progress_wrong_status(status): with pytest.raises(AssertionError): HookClient.assert_in_progress(status, {})