fix: deleting non-existent topic shouldn't raise KeyError (#3285)
This commit is contained in:
parent
16d5d2df28
commit
c321ad46b0
3 changed files with 19 additions and 1 deletions
|
|
@ -32,6 +32,12 @@ def test_create_and_delete_topic():
|
|||
topics.should.have.length_of(0)
|
||||
|
||||
|
||||
@mock_sns_deprecated
|
||||
def test_delete_non_existent_topic():
|
||||
conn = boto.connect_sns()
|
||||
conn.delete_topic.when.called_with("a-fake-arn").should.throw(BotoServerError)
|
||||
|
||||
|
||||
@mock_sns_deprecated
|
||||
def test_get_missing_topic():
|
||||
conn = boto.connect_sns()
|
||||
|
|
|
|||
|
|
@ -35,6 +35,15 @@ def test_create_and_delete_topic():
|
|||
topics.should.have.length_of(0)
|
||||
|
||||
|
||||
@mock_sns
|
||||
def test_delete_non_existent_topic():
|
||||
conn = boto3.client("sns", region_name="us-east-1")
|
||||
|
||||
conn.delete_topic.when.called_with(
|
||||
TopicArn="arn:aws:sns:us-east-1:123456789012:fake-topic"
|
||||
).should.throw(conn.exceptions.NotFoundException)
|
||||
|
||||
|
||||
@mock_sns
|
||||
def test_create_topic_with_attributes():
|
||||
conn = boto3.client("sns", region_name="us-east-1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue