Skip to content

Commit

Permalink
Update test for non-existent queue
Browse files Browse the repository at this point in the history
  • Loading branch information
bensteinberg committed May 22, 2024
1 parent b27388f commit 0bd25e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from click.testing import CliRunner
from uuid import uuid4
import boto3
import botocore
from perma_mirror.poll_for_warcs import main
from helpers import simulate_aws

Expand Down Expand Up @@ -31,11 +32,13 @@ def test_help():


def test_nonexistent_queue(sqs, s3):
with pytest.raises(sqs.exceptions.QueueDoesNotExist):
try:
runner.invoke(main,
['--no-repeat',
'no_such_queue'],
catch_exceptions=False)
except botocore.exceptions.ClientError as error:
assert error.response['Error']['Code'] == 'AWS.SimpleQueueService.NonExistentQueue'


def test_cli(sqs, s3, tmp_path):
Expand Down

0 comments on commit 0bd25e1

Please sign in to comment.