#NEWLINE# def test_requests_cm( self ) : #NEWLINE# #INDENT# '\n        Tests whether requests can be used importing standard_library modules\n        previously with the hooks context manager\n        ' #NEWLINE# code = '\n            from future import standard_library\n            with standard_library.hooks():\n                import builtins\n                import html.parser\n                import http.client\n            ' #NEWLINE# with write_module ( code , self . tempdir ) : #NEWLINE# #INDENT# import test_imports_future_stdlib #NEWLINE# try : #NEWLINE# #INDENT# import requests #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# print ( "Requests doesn't seem to be available. Skipping requests test ..." ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# r = requests . get ( 'http://google.com' ) #NEWLINE# self . assertTrue ( r ) #NEWLINE# #UNINDENT# self . assertTrue ( True )