summaryrefslogtreecommitdiff
path: root/python/qpid
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
commit9e10f4ea3b2f8ab6650f635cada48e4735ca20d7 (patch)
tree26ad3b8dffa17fa665fe7a033a7c8092839df011 /python/qpid
parent6b09696b216c090b512c6af92bf7976ae3407add (diff)
downloadqpid-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/qpid')
-rw-r--r--python/qpid/client.py2
-rw-r--r--python/qpid/connection.py4
-rw-r--r--python/qpid/testlib.py9
3 files changed, 5 insertions, 10 deletions
diff --git a/python/qpid/client.py b/python/qpid/client.py
index 3efd79c389..edcd1b8ad2 100644
--- a/python/qpid/client.py
+++ b/python/qpid/client.py
@@ -115,8 +115,6 @@ class ClientDelegate(Delegate):
self.client.started.set()
def message_transfer(self, ch, msg):
- if isinstance(msg.body, ReferenceId):
- msg.reference = ch.references.get(msg.body.id)
self.client.queue(msg.destination).put(msg)
def message_open(self, ch, msg):
diff --git a/python/qpid/connection.py b/python/qpid/connection.py
index 46b58e83b7..39bcde17df 100644
--- a/python/qpid/connection.py
+++ b/python/qpid/connection.py
@@ -239,9 +239,7 @@ class Response(Frame):
return "[%s] Response(%s,%s,%s) %s" % (self.channel, self.id, self.request_id, self.batch_offset, self.method)
def uses_struct_encoding(spec):
- return (spec.major == 0 and
- spec.minor == 10 and
- "transitional" not in spec.file)
+ return (spec.major == 0 and spec.minor == 10)
class Header(Frame):
diff --git a/python/qpid/testlib.py b/python/qpid/testlib.py
index 0b2a1b78d6..28c07ba43a 100644
--- a/python/qpid/testlib.py
+++ b/python/qpid/testlib.py
@@ -280,18 +280,17 @@ class TestBase(unittest.TestCase):
routing_key=routing_key)
else:
self.channel.message_transfer(
- destination=exchange, body=body,
- application_headers=properties,
- routing_key=routing_key)
+ destination=exchange,
+ content=Content(body, properties={'application_headers':properties,'routing_key':routing_key}))
msg = queue.get(timeout=1)
if testrunner.use08spec():
self.assertEqual(body, msg.content.body)
if (properties):
self.assertEqual(properties, msg.content.properties)
else:
- self.assertEqual(body, msg.body)
+ self.assertEqual(body, msg.content.body)
if (properties):
- self.assertEqual(properties, msg.application_headers)
+ self.assertEqual(properties, msg.content['application_headers'])
def assertPublishConsume(self, queue="", exchange="", routing_key="", properties=None):
"""