diff --git a/kombu/connection.py b/kombu/connection.py index 626bb4ea..b7bc2c8a 100644 --- a/kombu/connection.py +++ b/kombu/connection.py @@ -48,9 +48,9 @@ class BrokerConnection(object): ``amqplib``, ``pika``, ``redis``, ``memory``. :keyword connect_timeout: Timeout in seconds for connecting to the server. May not be suported by the specified transport. - :keyword transport_options: A dict of additional connection arguments to pass to - alternate kombu channel implementations (useful for things like SQLAlchemy - engine arguments) + :keyword transport_options: A dict of additional connection arguments to + pass to alternate kombu channel implementations. Consult the transport + documentation for available options. **Usage** @@ -81,7 +81,8 @@ class BrokerConnection(object): def __init__(self, hostname="localhost", userid="guest", password="guest", virtual_host="/", port=None, insist=False, - ssl=False, transport=None, connect_timeout=5, backend_cls=None, transport_options={}): + ssl=False, transport=None, connect_timeout=5, backend_cls=None, + transport_options={}, **kwargs): self.hostname = hostname self.userid = userid self.password = password diff --git a/kombu/tests/test_connection.py b/kombu/tests/test_connection.py index 96df4898..34863eab 100644 --- a/kombu/tests/test_connection.py +++ b/kombu/tests/test_connection.py @@ -22,7 +22,7 @@ class test_Connection(unittest.TestCase): _connection = conn.connection conn.close() self.assertFalse(_connection.connected) - self.assertIsInstance(conn.transport, Transport) + self.assertIsInstance(conn.transport, Transport) def test__enter____exit__(self): conn = self.conn @@ -100,12 +100,13 @@ class test_Connection(unittest.TestCase): class test_Connection_With_Broker_Args(unittest.TestCase): _extra_args = { - 'pool_recycle' : 3600, - 'echo' : True + 'pool_recycle': 3600, + 'echo': True } def setUp(self): - self.conn = BrokerConnection(port=5672, transport=Transport, transport_options=self._extra_args) + self.conn = BrokerConnection(port=5672, transport=Transport, + transport_options=self._extra_args) def test_establish_connection(self): conn = self.conn