diff options
author | Gordon Sim <gsim@apache.org> | 2007-08-28 19:38:17 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-08-28 19:38:17 +0000 |
commit | 9e10f4ea3b2f8ab6650f635cada48e4735ca20d7 (patch) | |
tree | 26ad3b8dffa17fa665fe7a033a7c8092839df011 /python/tests_0-10/example.py | |
parent | 6b09696b216c090b512c6af92bf7976ae3407add (diff) | |
download | qpid-python-9e10f4ea3b2f8ab6650f635cada48e4735ca20d7.tar.gz |
Updated message.transfer encoding to use header and content segments (including new structs).
Unified more between the basic and message classes messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570538 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests_0-10/example.py')
-rw-r--r-- | python/tests_0-10/example.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/python/tests_0-10/example.py b/python/tests_0-10/example.py index e4c80951ac..e3e2c3b095 100644 --- a/python/tests_0-10/example.py +++ b/python/tests_0-10/example.py @@ -76,10 +76,9 @@ class ExampleTest (TestBase): # Now lets publish a message and see if our consumer gets it. To do # this we need to import the Content class. - body = "Hello World!" - channel.message_transfer(destination="test", - routing_key="key", - body = body) + sent = Content("Hello World!") + sent["routing_key"] = "key" + channel.message_transfer(destination="test", content=sent) # Now we'll wait for the message to arrive. We can use the timeout # argument in case the server hangs. By default queue.get() will wait @@ -87,7 +86,7 @@ class ExampleTest (TestBase): msg = queue.get(timeout=10) # And check that we got the right response with assertEqual - self.assertEqual(body, msg.body) + self.assertEqual(sent.body, msg.content.body) # Now acknowledge the message. msg.complete() |