diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-01-18 17:32:55 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-01-18 17:32:55 +0000 |
| commit | b43036056e0dc7ad8fb919bd1f5b065ff01502c5 (patch) | |
| tree | af43d5182aa8c7d0675738b5c613f0fdf5e4553b /python/tests_0-10 | |
| parent | 4af4ec466428accc35320c2f307709d6545924f8 (diff) | |
| download | qpid-python-b43036056e0dc7ad8fb919bd1f5b065ff01502c5.tar.gz | |
fixed python dependence on the content-length attribute (bz 419371)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@613211 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests_0-10')
| -rw-r--r-- | python/tests_0-10/message.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/python/tests_0-10/message.py b/python/tests_0-10/message.py index 1daaad9ba1..9ec1cc270c 100644 --- a/python/tests_0-10/message.py +++ b/python/tests_0-10/message.py @@ -720,6 +720,20 @@ class MessageTests(TestBase): #check all 'browsed' messages are still on the queue self.assertEqual(5, channel.queue_query(queue="q").message_count) + def test_no_size(self): + self.queue_declare(queue = "q", exclusive=True, auto_delete=True) + + ch = self.channel + ch.message_transfer(content=SizelessContent(properties={'routing_key' : "q"}, body="message-body")) + + ch.message_subscribe(queue = "q", destination="d", confirm_mode = 0) + ch.message_flow(unit = 0, value = 0xFFFFFFFF, destination = "d") + ch.message_flow(unit = 1, value = 0xFFFFFFFF, destination = "d") + + queue = self.client.queue("d") + msg = queue.get(timeout = 3) + self.assertEquals("message-body", msg.content.body) + def assertDataEquals(self, channel, msg, expected): self.assertEquals(expected, msg.content.body) @@ -728,3 +742,8 @@ class MessageTests(TestBase): extra = queue.get(timeout=1) self.fail("Queue not empty, contains: " + extra.content.body) except Empty: None + +class SizelessContent(Content): + + def size(self): + return None |
