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 <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-22 08:22:19 -04:00
parent 9657073262
commit 843bf52bea

View File

@ -193,26 +193,3 @@ def stub_out_registry_and_store_server(stubs, base_dir, **kwargs):
glance.common.client.BaseClient._sendable) glance.common.client.BaseClient._sendable)
stubs.Set(glance.common.client.BaseClient, '_sendable', stubs.Set(glance.common.client.BaseClient, '_sendable',
fake_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)