Remove old fakes

There are a number of fakes in the testing directory that are no longer
used and can be removed.

Change-Id: Ie7ea157cfe597d614eee172e2ec97557289ac12f
This commit is contained in:
Jamie Lennox 2016-07-06 13:36:11 +10:00
parent 6dafb78290
commit 7e21c0c6f2

View File

@ -13,13 +13,11 @@
# under the License.
#
import json
import mock
import six
import sys
from keystoneauth1 import fixture
import requests
AUTH_TOKEN = "foobar"
@ -115,13 +113,6 @@ class FakeOptions(object):
self.os_beta_command = False
class FakeClient(object):
def __init__(self, **kwargs):
self.endpoint = kwargs['endpoint']
self.token = kwargs['token']
class FakeClientManager(object):
def __init__(self):
@ -147,13 +138,6 @@ class FakeClientManager(object):
}
class FakeModule(object):
def __init__(self, name, version):
self.name = name
self.__version__ = version
class FakeResource(object):
def __init__(self, manager=None, info=None, loaded=False, methods=None):
@ -202,28 +186,3 @@ class FakeResource(object):
def keys(self):
return self._info.keys()
class FakeResponse(requests.Response):
def __init__(self, headers=None, status_code=200,
data=None, encoding=None):
super(FakeResponse, self).__init__()
headers = headers or {}
self.status_code = status_code
self.headers.update(headers)
self._content = json.dumps(data)
if not isinstance(self._content, six.binary_type):
self._content = self._content.encode()
class FakeModel(dict):
def __getattr__(self, key):
try:
return self[key]
except KeyError:
raise AttributeError(key)