'check that adapter connection with AMQP is not happening in constructor'

def test_connect_no_adapter_connect_from_constructor(self):

    with mock.patch('pika.connection.Connection._adapter_connect', return_value=Exception('_adapter_connect    failed')) as adapter_connect_mock:
        with mock.patch('pika.connection.Connection.add_timeout', return_value='timer') as add_timeout_mock:
            conn = connection.Connection()
            self.assertFalse(adapter_connect_mock.called)
            self.assertEqual(conn.connection_state, conn.CONNECTION_INIT)
            self.assertIsNotNone(conn._connection_attempt_timer)
            add_timeout_mock.assert_called_once_with(0, conn._on_connect_timer)
