Send more than 1 message in messages_get_many

A bug in falcon prevented this test to be meaningful. That bug has been
fixed and now we can serialize several messages ids in a query
parameter.

Change-Id: Ida8d790fc6222c00b24e24a7a4c303d5b3d16351
This commit is contained in:
Flavio Percoco
2014-09-09 19:12:09 +02:00
parent 0a125f7bc2
commit 2973961b95

View File

@@ -312,15 +312,12 @@ class QueuesV1QueueFunctionalTest(base.QueuesTestBase):
messages = [
{'ttl': 60, 'body': 'Post It 1!'},
# NOTE(falper87): Waiting for
# https://github.com/racker/falcon/issues/198
#{'ttl': 60, 'body': 'Post It 2!'},
#{'ttl': 60, 'body': 'Post It 3!'},
{'ttl': 60, 'body': 'Post It 2!'},
{'ttl': 60, 'body': 'Post It 3!'},
]
res = queue.post(messages)['resources']
msgs_id = [ref.split('/')[-1] for ref in res]
messages = queue.messages(*msgs_id)
self.assertTrue(isinstance(messages, iterator._Iterator))
self.assertEqual(len(list(messages)), 1)
self.assertEqual(len(list(messages)), 3)