diff options
| author | Gordon Sim <gsim@apache.org> | 2007-01-29 12:13:56 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-01-29 12:13:56 +0000 |
| commit | 0a9aac9472bc97bc42ec1219741a2e8593474677 (patch) | |
| tree | 70b99562bc0f9dffe34fe2d4ef02ecfeaf70cfb8 /python | |
| parent | a327ecc9225fb303f7fc1305d0e135f331dc7bce (diff) | |
| download | qpid-python-0a9aac9472bc97bc42ec1219741a2e8593474677.tar.gz | |
Fixes to tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501022 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/tests/exchange.py | 4 | ||||
| -rw-r--r-- | python/tests/queue.py | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/python/tests/exchange.py b/python/tests/exchange.py index 143f46e4dc..54c462de24 100644 --- a/python/tests/exchange.py +++ b/python/tests/exchange.py @@ -316,9 +316,9 @@ class MiscellaneousErrorsTests(TestBase): self.channel.exchange_declare(exchange="test_different_declared_type_exchange", type="direct") try: self.channel.exchange_declare(exchange="test_different_declared_type_exchange", type="topic") - self.fail("Expected 507 for redeclaration of exchange with different type.") + self.fail("Expected 530 for redeclaration of exchange with different type.") except Closed, e: - self.assertConnectionException(507, e.args[0]) + self.assertConnectionException(530, e.args[0]) #cleanup other = self.connect() c2 = other.channel(1) diff --git a/python/tests/queue.py b/python/tests/queue.py index 2d592b8642..ea83ce8b39 100644 --- a/python/tests/queue.py +++ b/python/tests/queue.py @@ -48,11 +48,11 @@ class QueueTests(TestBase): self.assertEqual(0, reply.message_count) #send a further message and consume it, ensuring that the other messages are really gone - channel.message_transfer(destination="test-exchange", routing_key="key", content=Content("four")) + channel.message_transfer(destination="test-exchange", routing_key="key", body="four") channel.message_consume(queue="test-queue", destination="tag", no_ack=True) queue = self.client.queue("tag") msg = queue.get(timeout=1) - self.assertEqual("four", msg.content.body) + self.assertEqual("four", msg.body) #check error conditions (use new channels): channel = self.client.channel(2) @@ -74,7 +74,8 @@ class QueueTests(TestBase): self.assertConnectionException(530, e.args[0]) #cleanup - channel = self.client.channel(4) + other = self.connect() + channel = other.channel(1) channel.channel_open() channel.exchange_delete(exchange="test-exchange") @@ -207,7 +208,7 @@ class QueueTests(TestBase): channel.message_consume(destination="consumer_tag", queue="delete-me-2", no_ack=True) queue = self.client.queue("consumer_tag") msg = queue.get(timeout=1) - self.assertEqual("message", msg.content.body) + self.assertEqual("message", msg.body) channel.message_cancel(destination="consumer_tag") #retry deletion on empty queue: |
