1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
import pytest
from botocore.exceptions import OperationNotPageableError
async def test_get_paginator_not_supported_by_service(sns_client):
operation_name = 'list_tags_for_resource'
with pytest.raises(OperationNotPageableError):
sns_client.get_paginator(operation_name)
async def test_get_waiter_not_supported_by_service(sns_client):
waiter_name = 'sns_does_not_support_waiters'
with pytest.raises(
ValueError, match=f'Waiter does not exist: {waiter_name}'
):
sns_client.get_waiter(waiter_name)
async def test_get_waiter_invalid_waiter_name(cloudformation_client):
waiter_name = 'this_name_is_invalid'
with pytest.raises(
ValueError, match=f'Waiter does not exist: {waiter_name}'
):
cloudformation_client.get_waiter(waiter_name)
|