# Path: aiobotocore/waiter.py
# class NormalizedOperationMethod(_NormalizedOperationMethod):
# class AIOWaiter(Waiter):
#     async def __call__(self, **kwargs):
#     async def wait(self, **kwargs):
# def create_waiter_with_client(waiter_name, waiter_model, client):
#     async def wait(self, **kwargs):


import asyncio
import uuid
import pytest
from aiobotocore.waiter import WaiterError

@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_delete_table(dynamodb_client, dynamodb_table_def):
    table_name = dynamodb_table_def['TableName']

    await dynamodb_client.create_table(**dynamodb_table_def)

    response = await dynamodb_client.describe_table(
        TableName=table_name
    )
    assert response['Table']['TableStatus'] == 'ACTIVE'

    response = await dynamodb_client.delete_table(
        TableName=table_name
    )
    pytest.aio.assert_status_code(response, 200)

    response = await dynamodb_client.list_tables()
    assert table_name not in response['TableNames']


@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_waiter_table_exists_failure(dynamodb_client):
    waiter = dynamodb_client.get_waiter('table_exists')
    with pytest.raises(
            WaiterError,

# Path: aiobotocore/waiter.py
# class NormalizedOperationMethod(_NormalizedOperationMethod):
# class AIOWaiter(Waiter):
#     async def __call__(self, **kwargs):
#     async def wait(self, **kwargs):
# def create_waiter_with_client(waiter_name, waiter_model, client):
#     async def wait(self, **kwargs):


# Path: tests/test_dynamodb.py
import asyncio
import uuid
import pytest
from aiobotocore.waiter import WaiterError


@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_delete_table(dynamodb_client, dynamodb_table_def):
    table_name = dynamodb_table_def['TableName']

    await dynamodb_client.create_table(**dynamodb_table_def)

    response = await dynamodb_client.describe_table(
        TableName=table_name
    )
    assert response['Table']['TableStatus'] == 'ACTIVE'

    response = await dynamodb_client.delete_table(
        TableName=table_name
    )
    pytest.aio.assert_status_code(response, 200)

    response = await dynamodb_client.list_tables()
    assert table_name not in response['TableNames']


@pytest.mark.moto
@pytest.mark.parametrize('signature_version', ['v4'])
@pytest.mark.asyncio
async def test_waiter_table_exists_failure(dynamodb_client):
    waiter = dynamodb_client.get_waiter('table_exists')
    with pytest.raises(
            WaiterError,

            match='Waiter TableExists failed: Max attempts exceeded'):