summaryrefslogtreecommitdiff
path: root/qpid/python/tests_0-10/example.py
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-08-28 19:38:17 +0000
committerGordon Sim <gsim@apache.org>2007-08-28 19:38:17 +0000
commitb7b4a5407af61099567b8f1b3765cfada6150312 (patch)
tree84b36342792406d239c78b1fa040e9d3752a36c5 /qpid/python/tests_0-10/example.py
parent6dacede976a8c5145ebc8bb74622403b5d8de204 (diff)
downloadqpid-python-b7b4a5407af61099567b8f1b3765cfada6150312.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@570538 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests_0-10/example.py')
-rw-r--r--qpid/python/tests_0-10/example.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/qpid/python/tests_0-10/example.py b/qpid/python/tests_0-10/example.py
index e4c80951ac..e3e2c3b095 100644
--- a/qpid/python/tests_0-10/example.py
+++ b/qpid/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()