diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2013-11-20 18:02:09 -0600 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2013-11-21 01:27:10 -0600 |
| commit | 9062811d10f2ab660ce38f9bd20be9c52daa9479 (patch) | |
| tree | d01b271b1ae7c968c1c009cd6f7dada5ef1a3a37 /openstackclient/tests/object/v1/fakes.py | |
| parent | d45187a0c163187649e29931d21c4607379d1e73 (diff) | |
| download | python-openstackclient-9062811d10f2ab660ce38f9bd20be9c52daa9479.tar.gz | |
Expand support for command extensions
Allows client libraries to have complete access to the rest of the
OSC ClientManager. In addition, extension libraries can define
global options (for API version options/env vars) and define
versioned API entry points similar to the in-repo commands.
The changes to ClientManager exposed some issues in the existing
object api tests that needed to be cleaned up.
Change-Id: Ic9662edf34c5dd130a2f1a69d2454adefc1f8a95
Diffstat (limited to 'openstackclient/tests/object/v1/fakes.py')
| -rw-r--r-- | openstackclient/tests/object/v1/fakes.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openstackclient/tests/object/v1/fakes.py b/openstackclient/tests/object/v1/fakes.py index fbc784aa..37c35d3b 100644 --- a/openstackclient/tests/object/v1/fakes.py +++ b/openstackclient/tests/object/v1/fakes.py @@ -13,6 +13,10 @@ # under the License. # +from openstackclient.tests import fakes +from openstackclient.tests import utils + + container_name = 'bit-bucket' container_bytes = 1024 container_count = 1 @@ -65,3 +69,19 @@ OBJECT_2 = { 'content_type': object_content_type_2, 'last_modified': object_modified_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 = FakeObjectv1Client( + endpoint=fakes.AUTH_URL, + token=fakes.AUTH_TOKEN, + ) |
