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 | e4341def77be591ea5be66a0b7ccbe3d69f225b6 (patch) | |
| tree | 9fce5fd72b6ef63f9d222b221597b8a12fc7529f /qpid/python/tests_0-10 | |
| parent | 7e5c60146c7d7e80368edbf005dbaa06eed787a5 (diff) | |
| download | qpid-python-e4341def77be591ea5be66a0b7ccbe3d69f225b6.tar.gz | |
fixed python dependence on the content-length attribute (bz 419371)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@613211 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests_0-10')
| -rw-r--r-- | qpid/python/tests_0-10/message.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/qpid/python/tests_0-10/message.py b/qpid/python/tests_0-10/message.py index 1daaad9ba1..9ec1cc270c 100644 --- a/qpid/python/tests_0-10/message.py +++ b/qpid/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 |
