summaryrefslogtreecommitdiff
path: root/python/tests
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/exchange.py4
-rw-r--r--python/tests/queue.py9
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: