diff options
| author | Gordon Sim <gsim@apache.org> | 2008-03-11 15:34:20 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-03-11 15:34:20 +0000 |
| commit | b32c30ec005b9e6af28785f2c924c3cb01f3c452 (patch) | |
| tree | 69f4a04a1a345758596996d96645173812423568 /python/tests_0-10/queue.py | |
| parent | 6dbea2e3b51011a28a23505145aa3a3aab6a21fa (diff) | |
| download | qpid-python-b32c30ec005b9e6af28785f2c924c3cb01f3c452.tar.gz | |
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/qpid@635976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests_0-10/queue.py')
| -rw-r--r-- | python/tests_0-10/queue.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/python/tests_0-10/queue.py b/python/tests_0-10/queue.py index bacbc60bc1..39305d4554 100644 --- a/python/tests_0-10/queue.py +++ b/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): |
