summaryrefslogtreecommitdiff
path: root/python/qpid/tests
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-11-16 13:50:57 +0000
committerRafael H. Schloming <rhs@apache.org>2009-11-16 13:50:57 +0000
commitfa21df207fb4a5be2d1fdf142a6ec31a0fab5a7f (patch)
tree258efa6d94c09507d163a6f561eae8976ca34414 /python/qpid/tests
parent00033f8338a647d79580ca2356345074d84c7476 (diff)
downloadqpid-python-fa21df207fb4a5be2d1fdf142a6ec31a0fab5a7f.tar.gz
added another create exchange test
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@880750 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/tests')
-rw-r--r--python/qpid/tests/messaging.py34
1 files changed, 25 insertions, 9 deletions
diff --git a/python/qpid/tests/messaging.py b/python/qpid/tests/messaging.py
index 34ff57babe..adaa46f73c 100644
--- a/python/qpid/tests/messaging.py
+++ b/python/qpid/tests/messaging.py
@@ -568,14 +568,21 @@ class AddressTests(Base):
rcv = self.ssn.receiver("test-create-queue")
self.drain(rcv, expected=[content])
- def testCreateExchange(self):
- snd = self.ssn.sender("test-create-exchange; {create: always, "
- "delete: always, node-properties: {type: topic, "
- "durable: False, x-properties: {auto_delete: true}}}")
+ def createExchangeTest(self, props=""):
+ addr = """test-create-exchange; {
+ create: always,
+ delete: always,
+ node-properties: {
+ type: topic,
+ durable: False,
+ x-properties: {auto_delete: true, %s}
+ }
+ }""" % props
+ snd = self.ssn.sender(addr)
snd.send("ping")
rcv1 = self.ssn.receiver("test-create-exchange/first")
- rcv2 = self.ssn.receiver("test-create-exchange/second")
- rcv3 = self.ssn.receiver("test-create-exchange")
+ rcv2 = self.ssn.receiver("test-create-exchange/first")
+ rcv3 = self.ssn.receiver("test-create-exchange/second")
for r in (rcv1, rcv2, rcv3):
try:
r.fetch(0)
@@ -583,12 +590,21 @@ class AddressTests(Base):
except Empty:
pass
msg1 = Message(self.content("testCreateExchange", 1), subject="first")
- msg2 = Message(self.content("testCreateExchange", 1), subject="second")
+ msg2 = Message(self.content("testCreateExchange", 2), subject="second")
snd.send(msg1)
snd.send(msg2)
self.drain(rcv1, expected=[msg1.content])
- self.drain(rcv2, expected=[msg2.content])
- self.drain(rcv3, expected=[msg1.content, msg2.content])
+ self.drain(rcv2, expected=[msg1.content])
+ self.drain(rcv3, expected=[msg2.content])
+
+ def testCreateExchange(self):
+ self.createExchangeTest()
+
+ def testCreateExchangeDirect(self):
+ self.createExchangeTest("type: direct")
+
+ def testCreateExchangeTopic(self):
+ self.createExchangeTest("type: topic")
def testDeleteBySender(self):
snd = self.ssn.sender("test-delete; {create: always}")