#NEWLINE# def test_discover_application_with_environment( self ) : #NEWLINE# #INDENT# '\n        An ``Application`` with ``Environment`` objects is discovered from a\n        ``Unit`` with ``Environment`` objects.\n        ' #NEWLINE# environment_variables = ( ( b'CUSTOM_ENV_A' , b'a value' ) , ( b'CUSTOM_ENV_B' , b'something else' ) ) #NEWLINE# environment = Environment ( variables = environment_variables ) #NEWLINE# unit1 = UNIT_FOR_APP . set ( 'environment' , environment ) #NEWLINE# units = { #NEWLINE# #INDENT# units . name : unit1 , #NEWLINE# #UNINDENT# } #NEWLINE# applications = [ APP . set ( 'environment' , dict ( environment_variables ) ) ] #NEWLINE# self . _verify_discover_state_applications ( units , applications )