summaryrefslogtreecommitdiff
path: root/openstackclient/tests/object/v1/fakes.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2014-09-18 22:10:03 -0500
committerDean Troyer <dtroyer@gmail.com>2014-09-29 00:02:32 -0500
commit207c8cf3ef9237d21cde704eff767523b5f12f35 (patch)
tree77da17103f0f60b4b1692e142d3b33b5cde64260 /openstackclient/tests/object/v1/fakes.py
parent02320a5a2437acdc501a003cca53310a444e4b4e (diff)
downloadpython-openstackclient-207c8cf3ef9237d21cde704eff767523b5f12f35.tar.gz
Test top-to-bottom: object-store containers
Replicate the object-store container command tests but use requests_mock to test the entire stack down to the requests module. These will be useful regressions tests when the existing object-store lib modules are moved to the low-level API object. Change-Id: Ibf25be46156eb1009f1b66f02f2073d3913b846d
Diffstat (limited to 'openstackclient/tests/object/v1/fakes.py')
-rw-r--r--openstackclient/tests/object/v1/fakes.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/openstackclient/tests/object/v1/fakes.py b/openstackclient/tests/object/v1/fakes.py
index 87f6cab6..f10437b6 100644
--- a/openstackclient/tests/object/v1/fakes.py
+++ b/openstackclient/tests/object/v1/fakes.py
@@ -17,6 +17,9 @@ from openstackclient.tests import fakes
from openstackclient.tests import utils
+ACCOUNT_ID = 'tqbfjotld'
+ENDPOINT = 'https://0.0.0.0:6482/v1/' + ACCOUNT_ID
+
container_name = 'bit-bucket'
container_bytes = 1024
container_count = 1
@@ -71,17 +74,11 @@ OBJECT_2 = {
}
-class FakeObjectv1Client(object):
- def __init__(self, **kwargs):
- self.endpoint = kwargs['endpoint']
- self.token = kwargs['token']
-
-
class TestObjectv1(utils.TestCommand):
def setUp(self):
super(TestObjectv1, self).setUp()
- self.app.client_manager.object_store = FakeObjectv1Client(
+ self.app.client_manager.object_store = fakes.FakeClient(
endpoint=fakes.AUTH_URL,
token=fakes.AUTH_TOKEN,
)