#NEWLINE# def test_custom_url_from_env( self ) : #NEWLINE# #INDENT# import os #NEWLINE# from gcloud._testing import _Monkey #NEWLINE# from gcloud.connection import API_BASE_URL #NEWLINE# from gcloud.environment_vars import GCD_HOST #NEWLINE# HOST = 'CURR_HOST' #NEWLINE# fake_environ = { #NEWLINE# #INDENT# GCD_HOST : HOST , #NEWLINE# #UNINDENT# } #NEWLINE# with _Monkey ( os , environ = fake_environ ) : #NEWLINE# #INDENT# conn = self . _makeOne ( ) #NEWLINE# #UNINDENT# self . assertNotEqual ( conn . api_base_url , API_BASE_URL ) #NEWLINE# self . assertEqual ( conn . api_base_url , ( HOST + '/datastore' ) )