#NEWLINE# def test_env( self ) : #NEWLINE# #INDENT# env = { #NEWLINE# #INDENT# 'alpha' : 'a' , #NEWLINE# 'beta' : 'b' , #NEWLINE# #UNINDENT# } #NEWLINE# self . useFixture ( fixtures . MonkeyPatch ( 'os.environ' , env ) ) #NEWLINE# self . assertEqual ( self [ 'beta' ] , cliutils . env ( 'beta' ) ) #NEWLINE# self . assertEqual ( env [ 'beta' ] , cliutils . env ( 'beta' , 'alpha' ) ) #NEWLINE# self . assertEqual ( env [ 'alpha' ] , cliutils . env ( 'alpha' , 'beta' ) ) #NEWLINE# self . assertEqual ( env [ 'beta' ] , cliutils . env ( 'gamma' , 'beta' ) ) #NEWLINE# self . assertEqual ( '' , cliutils . env ( 'gamma' ) ) #NEWLINE# self . assertEqual ( 'c' , cliutils . env ( 'gamma' , default = 'c' ) )