#NEWLINE# def test_environ_defaults( ) : #NEWLINE# #INDENT# app = flask . Flask ( __name__ ) #NEWLINE# app . testing = True #NEWLINE# @ app . route ( '/' ) #NEWLINE# def index( ) : #NEWLINE# #INDENT# return flask . request . url #NEWLINE# #UNINDENT# ctx = app . test_request_context ( ) #NEWLINE# assert ( index . request . url == 'http://localhost/' ) #NEWLINE# with app . test_client ( ) as c : #NEWLINE# #INDENT# rv = c . get ( '/' ) #NEWLINE# assert ( rv . data == b'http://localhost/' )