Skip to content

Commit

Permalink
test error conditions of client.get_waiter()
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-keller committed Aug 18, 2024
1 parent e879206 commit 2a159ad
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import pytest


@pytest.mark.moto
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)


@pytest.mark.moto
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)

0 comments on commit 2a159ad

Please # to comment.