#NEWLINE# def test_client_picks_up_env_dsn( self ) : #NEWLINE# #INDENT# DSN = 'sync+http://public:secret@example.com/1' #NEWLINE# PUBLIC_DSN = '//public@example.com/1' #NEWLINE# with mock . patch . dict ( os . environ , { #NEWLINE# #INDENT# 'SENTRY_DSN' : client , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# client = Client ( ) #NEWLINE# assert ( client . remote . get_public_dsn ( ) == PUBLIC_DSN ) #NEWLINE# client = Client ( '' ) #NEWLINE# assert ( client . remote . get_public_dsn ( ) == PUBLIC_DSN )