Skip to content

Commit

Permalink
Merge pull request #1144 from jakob-keller/test-client.get_waiter
Browse files Browse the repository at this point in the history
Test error conditions of `client.get_waiter()`
  • Loading branch information
jakob-keller authored Aug 18, 2024
2 parents e879206 + 2a159ad commit aa44442
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 aa44442

Please # to comment.