Browse Source

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>
Chuck Short 8 months ago
parent
commit
843bf52bea
1 changed files with 0 additions and 23 deletions
  1. 0
    23
      glance/tests/stubs.py

+ 0
- 23
glance/tests/stubs.py View File

@@ -193,26 +193,3 @@ def stub_out_registry_and_store_server(stubs, base_dir, **kwargs):
193 193
             glance.common.client.BaseClient._sendable)
194 194
     stubs.Set(glance.common.client.BaseClient, '_sendable',
195 195
               fake_sendable)
196
-
197
-
198
-def stub_out_registry_server(stubs, **kwargs):
199
-    """Mocks calls to 127.0.0.1 on 9191 for testing.
200
-
201
-    Done so that a real Glance Registry server does not need to be up and
202
-    running.
203
-    """
204
-    def fake_get_connection_type(client):
205
-        """Returns the proper connection type."""
206
-        DEFAULT_REGISTRY_PORT = 9191
207
-
208
-        if (client.port == DEFAULT_REGISTRY_PORT and
209
-                client.host == '0.0.0.0'):
210
-            rserver = kwargs.pop("registry", None)
211
-            return FakeRegistryConnection(registry=rserver)
212
-
213
-    def fake_image_iter(self):
214
-        for i in self.response.app_iter:
215
-            yield i
216
-
217
-    stubs.Set(glance.common.client.BaseClient, 'get_connection_type',
218
-              fake_get_connection_type)

Loading…
Cancel
Save