From 843bf52beaf7addbb346789664fd34a3a765efe8 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Wed, 22 Aug 2018 08:22:19 -0400 Subject: [PATCH] Remove stub_out_registry_server method The stub_out_registry_server method is not being used so remove it. Change-Id: I9b4c381caceb6da1d0736ae441fb6193b503a4a7 Signed-off-by: Chuck Short --- glance/tests/stubs.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/glance/tests/stubs.py b/glance/tests/stubs.py index 80bf5c84e3..5aa027a934 100644 --- a/glance/tests/stubs.py +++ b/glance/tests/stubs.py @@ -193,26 +193,3 @@ def stub_out_registry_and_store_server(stubs, base_dir, **kwargs): glance.common.client.BaseClient._sendable) stubs.Set(glance.common.client.BaseClient, '_sendable', fake_sendable) - - -def stub_out_registry_server(stubs, **kwargs): - """Mocks calls to 127.0.0.1 on 9191 for testing. - - Done so that a real Glance Registry server does not need to be up and - running. - """ - def fake_get_connection_type(client): - """Returns the proper connection type.""" - DEFAULT_REGISTRY_PORT = 9191 - - if (client.port == DEFAULT_REGISTRY_PORT and - client.host == '0.0.0.0'): - rserver = kwargs.pop("registry", None) - return FakeRegistryConnection(registry=rserver) - - def fake_image_iter(self): - for i in self.response.app_iter: - yield i - - stubs.Set(glance.common.client.BaseClient, 'get_connection_type', - fake_get_connection_type)