#NEWLINE# @ mock . patch . object ( FakeCatalog , 'url_for' , autospec = True ) #NEWLINE# @ mock . patch ( 'keystoneclient.v2_0.client.Client' , autospec = True ) #NEWLINE# def test_get_url( self , mock_ks , mock_uf ) : #NEWLINE# #INDENT# fake_url = 'http://127.0.0.1:6385' #NEWLINE# mock_uf . return_value = fake_url #NEWLINE# mock_ks . return_value = FakeClient ( ) #NEWLINE# res = keystone . get_service_url ( ) #NEWLINE# self . assertEqual ( fake_url , res )