From ed859ae39f0ac5cadf2e82f434dbfcfc4408c5a9 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 11 Mar 2008 15:34:20 +0000 Subject: Fixed headers exchange to allow unbind using binding key and not args Converted alternate exchange python tests git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@635976 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/tests_0-10/queue.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'qpid/python/tests_0-10/queue.py') diff --git a/qpid/python/tests_0-10/queue.py b/qpid/python/tests_0-10/queue.py index bacbc60bc1..39305d4554 100644 --- a/qpid/python/tests_0-10/queue.py +++ b/qpid/python/tests_0-10/queue.py @@ -126,27 +126,26 @@ class QueueTests(TestBase010): session.queue_declare(queue="queue-1", exclusive=True, auto_delete=True) #straightforward case, both exchange & queue exist so no errors expected: - session.queue_bind(queue="queue-1", exchange="amq.direct", routing_key="key1") + session.exchange_bind(queue="queue-1", exchange="amq.direct", binding_key="key1") #use the queue name where the routing key is not specified: session.exchange_bind(queue="queue-1", exchange="amq.direct") #try and bind to non-existant exchange try: - session.queue_bind(queue="queue-1", exchange="an-invalid-exchange", routing_key="key1") + session.exchange_bind(queue="queue-1", exchange="an-invalid-exchange", binding_key="key1") self.fail("Expected bind to non-existant exchange to fail") - except Closed, e: + except SessionException, e: self.assertEquals(404, e.args[0].error_code) - #need to reopen a session: - session = self.client.session(2) - session.session_open() + def test_bind_queue_existence(self): + session = self.session #try and bind non-existant queue: try: - session.queue_bind(queue="queue-2", exchange="amq.direct", routing_key="key1") + session.exchange_bind(queue="queue-2", exchange="amq.direct", binding_key="key1") self.fail("Expected bind of non-existant queue to fail") - except Closed, e: + except SessionException, e: self.assertEquals(404, e.args[0].error_code) def test_unbind_direct(self): -- cgit v1.2.1