File: test_client.py

package info (click to toggle)
python-aiobotocore 2.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,524 kB
  • sloc: python: 15,437; makefile: 84
file content (24 lines) | stat: -rw-r--r-- 806 bytes parent folder | download
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)