#NEWLINE# @ mock . patch . object ( systemconfig , 'SCDynamicPreferences' , autospec = True ) #NEWLINE# @ mock . patch . object ( systemconfig , 'logging' ) #NEWLINE# def testConfigureSystemProxy( self , mock_logging , mock_scdp ) : #NEWLINE# #INDENT# 'Test ConfigureSystemProxy success.' #NEWLINE# proxy = 'proxy' #NEWLINE# enable = True #NEWLINE# mock_scdp ( ) . SetProxy . return_value = True #NEWLINE# self . assertEqual ( None , systemconfig . ConfigureSystemProxy ( proxy , enable ) ) #NEWLINE# self . assertFalse ( self . error . called )