#NEWLINE# def test_DjangoBrokerConnection( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# from django.conf import settings #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# sys . stderr . write ( 'Django is not installed.                 Not testing django specific features.\n' ) #NEWLINE# return #NEWLINE# #UNINDENT# 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 ) #NEWLINE# expected_values = { #NEWLINE# #INDENT# 'backend_cls' : CARROT_BACKEND , #NEWLINE# 'hostname' : BROKER_HOST , #NEWLINE# 'port' : BROKER_PORT , #NEWLINE# 'virtual_host' : BROKER_VHOST , #NEWLINE# 'userid' : BROKER_USER , #NEWLINE# 'password' : BROKER_PASSWORD , #NEWLINE# #UNINDENT# } #NEWLINE# conn = DjangoBrokerConnection ( ) #NEWLINE# self . assertTrue ( isinstance ( conn , BrokerConnection ) ) #NEWLINE# for ( val_name , val_value ) in expected_values . items ( ) : #NEWLINE# #INDENT# self . assertEquals ( getattr ( conn , val_name , None ) , val_value )