From 2886b77c34b686b2cf42d3a60f80ed01c18b810d Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Mon, 10 Dec 2012 15:48:34 +0000 Subject: [PATCH] Tests passing --- kombu/tests/mocks.py | 4 ++-- kombu/tests/test_connection.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kombu/tests/mocks.py b/kombu/tests/mocks.py index 0512caed..16aa4389 100644 --- a/kombu/tests/mocks.py +++ b/kombu/tests/mocks.py @@ -22,7 +22,7 @@ class Message(base.Message): class Channel(base.StdChannel): open = True throw_decode_error = False - _ids = count(1) + _ids = count(1).next def __init__(self, connection): self.connection = connection @@ -30,7 +30,7 @@ class Channel(base.StdChannel): self.deliveries = count(1).next self.to_deliver = [] self.events = {'basic_return': set()} - self.channel_id = next(self._ids) + self.channel_id = self._ids() def _called(self, name): self.called.append(name) diff --git a/kombu/tests/test_connection.py b/kombu/tests/test_connection.py index 66544947..6997be69 100644 --- a/kombu/tests/test_connection.py +++ b/kombu/tests/test_connection.py @@ -291,7 +291,7 @@ class test_Connection(TestCase): c.maybe_switch_next() self.assertFalse(c._closed) self.assertEqual(c.hostname, 'foo') - self.assertIn(c.transport_cls, ('librabbitmq', 'pyamqp')) + self.assertIn(c.transport_cls, ('librabbitmq', 'pyamqp', 'amqp')) def test_heartbeat_check(self): c = Connection(transport=Transport)