support QueueNamePrefix in the SQS Backend
This commit is contained in:
parent
6e1196386f
commit
470ade25eb
4 changed files with 31 additions and 3 deletions
|
|
@ -16,6 +16,10 @@ def test_sqs_list_identities():
|
|||
res.data.should.contain("ListQueuesResponse")
|
||||
|
||||
res = test_client.put('/?Action=CreateQueue&QueueName=testqueue')
|
||||
res = test_client.put('/?Action=CreateQueue&QueueName=otherqueue')
|
||||
|
||||
res = test_client.get('/?Action=ListQueues&QueueNamePrefix=other')
|
||||
res.data.should_not.contain('testqueue')
|
||||
|
||||
res = test_client.put(
|
||||
'/123/testqueue?MessageBody=test-message&Action=SendMessage')
|
||||
|
|
|
|||
|
|
@ -31,6 +31,20 @@ def test_get_queue():
|
|||
nonexisting_queue.should.be.none
|
||||
|
||||
|
||||
@mock_sqs
|
||||
def test_get_queue_with_prefix():
|
||||
conn = boto.connect_sqs('the_key', 'the_secret')
|
||||
conn.create_queue("prefixa-queue")
|
||||
conn.create_queue("prefixb-queue")
|
||||
conn.create_queue("test-queue")
|
||||
|
||||
conn.get_all_queues().should.have.length_of(3)
|
||||
|
||||
queue = conn.get_all_queues("test-")
|
||||
queue.should.have.length_of(1)
|
||||
queue[0].name.should.equal("test-queue")
|
||||
|
||||
|
||||
@mock_sqs
|
||||
def test_delete_queue():
|
||||
conn = boto.connect_sqs('the_key', 'the_secret')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue