def test_DjangoBrokerConnection(self):
        try:
            from django.conf import settings
        except __HOLE__:
            sys.stderr.write(
                "Django is not installed. \
                Not testing django specific features.\n")
            return
        configured_or_configure(settings,
                CARROT_BACKEND=CARROT_BACKEND,
                BROKER_HOST=BROKER_HOST,
                BROKER_PORT=BROKER_PORT,
                BROKER_VHOST=BROKER_VHOST,
                BROKER_USER=BROKER_USER,
                BROKER_PASSWORD=BROKER_PASSWORD)

        expected_values = {
            "backend_cls": CARROT_BACKEND,
            "hostname": BROKER_HOST,
            "port": BROKER_PORT,
            "virtual_host": BROKER_VHOST,
            "userid": BROKER_USER,
            "password": BROKER_PASSWORD}

        conn = DjangoBrokerConnection()
        self.assertTrue(isinstance(conn, BrokerConnection))

        for val_name, val_value in expected_values.items():
            self.assertEquals(getattr(conn, val_name, None), val_value)
dataset/ETHPy150Open ask/carrot/tests/test_django.py/TestDjangoSpecific.test_DjangoBrokerConnection