#NEWLINE# @ mock . patch ( 'oauth2client.contrib.django_util.clientsecrets' ) #NEWLINE# def test_settings_initialize( self , clientsecrets ) : #NEWLINE# #INDENT# django . conf . settings . GOOGLE_OAUTH2_CLIENT_SECRETS_JSON = 'file.json' #NEWLINE# clientsecrets . loadfile . return_value = ( clientsecrets . TYPE_WEB , { #NEWLINE# #INDENT# 'client_id' : 'myid' , #NEWLINE# 'client_secret' : 'hunter2' , #NEWLINE# #UNINDENT# } ) #NEWLINE# oauth2_settings = django_util . OAuth2Settings ( django . conf . settings ) #NEWLINE# self . assertTrue ( clientsecrets . loadfile . called ) #NEWLINE# self . assertEqual ( self . client_id , 'myid' ) #NEWLINE# self . assertEqual ( oauth2_settings . client_secret , 'hunter2' )