コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
def test_assert_in_progress_error_code_set():
    with pytest.raises(AssertionError):
        HookClient.assert_in_progress(
            HookStatus.IN_PROGRESS,
            {"errorCode": HandlerErrorCode.AccessDenied.value},
        )
コード例 #4
0
def test_assert_in_progress_result_set():
    with pytest.raises(AssertionError):
        HookClient.assert_in_progress(HookStatus.IN_PROGRESS, {"result": ""})
コード例 #5
0
def test_assert_in_progress_wrong_status(status):
    with pytest.raises(AssertionError):
        HookClient.assert_in_progress(status, {})