summaryrefslogtreecommitdiff
path: root/python/tests_0-10/query.py
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-08-21 15:51:41 +0000
committerGordon Sim <gsim@apache.org>2007-08-21 15:51:41 +0000
commitbb2883b9f5cfad0e028a9849ed91e36418a2d0ff (patch)
tree555686e2e819a875048610d88c2cee8e336b3687 /python/tests_0-10/query.py
parent955d5ccb544ff4f56d35c40aa8934cbf4dfff14e (diff)
downloadqpid-python-bb2883b9f5cfad0e028a9849ed91e36418a2d0ff.tar.gz
Refresh of transitional xml to more closely reflect latest specification
Initial execution-result support (not yet handled on c++ client) Generation is now all done through the ruby code (it is a little slower at present I'm afraid, will try to speed it up over the next weeks) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests_0-10/query.py')
-rw-r--r--python/tests_0-10/query.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/python/tests_0-10/query.py b/python/tests_0-10/query.py
index c2e08c003c..06f33be85b 100644
--- a/python/tests_0-10/query.py
+++ b/python/tests_0-10/query.py
@@ -30,16 +30,16 @@ class QueryTests(TestBase):
"""
channel = self.channel
#check returned type for the standard exchanges
- self.assertEqual("direct", channel.exchange_query(name="amq.direct").type)
- self.assertEqual("topic", channel.exchange_query(name="amq.topic").type)
- self.assertEqual("fanout", channel.exchange_query(name="amq.fanout").type)
- self.assertEqual("headers", channel.exchange_query(name="amq.match").type)
- self.assertEqual("direct", channel.exchange_query(name="").type)
+ self.assert_type("direct", channel.exchange_query(name="amq.direct"))
+ self.assert_type("topic", channel.exchange_query(name="amq.topic"))
+ self.assert_type("fanout", channel.exchange_query(name="amq.fanout"))
+ self.assert_type("headers", channel.exchange_query(name="amq.match"))
+ self.assert_type("direct", channel.exchange_query(name=""))
#declare an exchange
channel.exchange_declare(exchange="my-test-exchange", type= "direct", durable=False)
#check that the result of a query is as expected
response = channel.exchange_query(name="my-test-exchange")
- self.assertEqual("direct", response.type)
+ self.assert_type("direct", response)
self.assertEqual(False, response.durable)
self.assertEqual(False, response.not_found)
#delete the exchange
@@ -47,6 +47,9 @@ class QueryTests(TestBase):
#check that the query now reports not-found
self.assertEqual(True, channel.exchange_query(name="my-test-exchange").not_found)
+ def assert_type(self, expected_type, response):
+ self.assertEqual(expected_type, response.__getattr__("type"))
+
def test_binding_query_direct(self):
"""
Test that the binding_query method works as expected with the direct exchange