Skip to content

Commit

Permalink
Adapt tests to RabbitMQ 3.0 - immediate is not supported any more
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed Dec 19, 2012
1 parent cd59bb6 commit d06c1be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 0 additions & 6 deletions tests/test_basic.py
Expand Up @@ -148,12 +148,6 @@ def test_basic_return(self):
mandatory=True, body='')
client.wait(promise) # no error

promise = client.basic_publish(exchange='', routing_key=self.name,
immediate=True, body='')
with self.assertRaises(puka.NoConsumers):
r = client.wait(promise)
print r

promise = client.queue_delete(queue=self.name)
client.wait(promise)

Expand Down
10 changes: 5 additions & 5 deletions tests/test_publish_async.py
Expand Up @@ -83,8 +83,8 @@ def test_return(self):
client.wait(promise)

promise = client.basic_publish(exchange='', routing_key='',
body=self.msg, immediate=True)
with self.assertRaises(puka.NoConsumers):
body=self.msg, mandatory=True)
with self.assertRaises(puka.NoRoute):
client.wait(promise)


Expand All @@ -97,13 +97,13 @@ def test_return_2(self):
client.wait(promise)

promise = client.basic_publish(exchange='', routing_key='badname',
immediate=True, body=self.msg)
mandatory=True, body=self.msg)
try:
client.wait(promise)
except puka.NoConsumers, (response,):
except puka.NoRoute, (response,):
pass

self.assertEqual(response['reply_code'], 313)
self.assertEqual(response['reply_code'], 312)

promise = client.queue_delete(queue=self.name)
client.wait(promise)
Expand Down

0 comments on commit d06c1be

Please sign in to comment.