Author: gsim
Date: Mon Jan 29 04:13:56 2007
New Revision: 501022
URL: http://svn.apache.org/viewvc?view=rev&rev=501022
Log:
Fixes to tests.
Modified:
incubator/qpid/branches/qpid.0-9/python/tests/exchange.py
incubator/qpid/branches/qpid.0-9/python/tests/queue.py
Modified: incubator/qpid/branches/qpid.0-9/python/tests/exchange.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/python/tests/exchange.py?view=diff&rev=501022&r1=501021&r2=501022
==============================================================================
--- incubator/qpid/branches/qpid.0-9/python/tests/exchange.py (original)
+++ incubator/qpid/branches/qpid.0-9/python/tests/exchange.py Mon Jan 29
04:13:56 2007
@@ -316,9 +316,9 @@
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)
Modified: incubator/qpid/branches/qpid.0-9/python/tests/queue.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/python/tests/queue.py?view=diff&rev=501022&r1=501021&r2=501022
==============================================================================
--- incubator/qpid/branches/qpid.0-9/python/tests/queue.py (original)
+++ incubator/qpid/branches/qpid.0-9/python/tests/queue.py Mon Jan 29 04:13:56
2007
@@ -48,11 +48,11 @@
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 @@
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 @@
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: