mirror of https://github.com/celery/kombu.git
Cosmetics
This commit is contained in:
parent
eb6216aeae
commit
9bf43fd9e9
|
@ -15,7 +15,7 @@ class test_misc(TestCase):
|
|||
|
||||
def test_iterconsume(self):
|
||||
|
||||
class Connection(object):
|
||||
class MyConnection(object):
|
||||
drained = 0
|
||||
|
||||
def drain_events(self, *args, **kwargs):
|
||||
|
@ -28,7 +28,7 @@ class test_misc(TestCase):
|
|||
def consume(self, *args, **kwargs):
|
||||
self.active = True
|
||||
|
||||
conn = Connection()
|
||||
conn = MyConnection()
|
||||
consumer = Consumer()
|
||||
it = compat._iterconsume(conn, consumer)
|
||||
self.assertEqual(it.next(), 1)
|
||||
|
|
|
@ -436,7 +436,9 @@ class test_Channel(TestCase):
|
|||
c.smembers.return_value = []
|
||||
|
||||
# We assert, that there should be at least one entry in the table.
|
||||
self.assertRaises(AssertionError, self.channel.get_table, 'celery')
|
||||
with self.assertRaises(AssertionError):
|
||||
self.channel.get_table("celery")
|
||||
|
||||
|
||||
class test_Redis(TestCase):
|
||||
|
||||
|
|
|
@ -284,8 +284,9 @@ class Channel(virtual.Channel):
|
|||
tables = [tuple(val.split(self.sep))
|
||||
for val in self._avail_client.smembers(
|
||||
self.keyprefix_queue % exchange)]
|
||||
assert len(tables) > 0, 'Queue list empty or key does not exist: %s' % (
|
||||
self.keyprefix_queue % exchange)
|
||||
assert(len(tables) > 0,
|
||||
'Queue list empty or key does not exist: %s' % (
|
||||
self.keyprefix_queue % exchange))
|
||||
return tables
|
||||
|
||||
def _purge(self, queue):
|
||||
|
|
Loading…
Reference in New Issue