diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2013-01-31 19:30:25 -0600 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2013-02-06 11:36:28 -0600 |
| commit | fbc412e533bd7cb07c6d930e194f660e14b2319f (patch) | |
| tree | 6446e48bf6c1663bef7afdf20840bbfff82cf434 /tests/test_clientmanager.py | |
| parent | b26cb5bf683e7f4f03d9704524a188b76ac5e9b9 (diff) | |
| download | python-openstackclient-fbc412e533bd7cb07c6d930e194f660e14b2319f.tar.gz | |
Multiple API version support
* Use multiple entry point groups to represent each API+version
combination supported
* Add some tests
Try it out:
* Right now only '* user' commands have multiple overlapping versions;
you can see the selection between v2.0 and v3 by looking at the
command help output for 'tenant' vs 'project':
os --os-identity-api-version=2.0 help set user
os --os-identity-api-version=3 help set user
Change-Id: I7114fd246843df0243d354a7cce697810bb7de62
Diffstat (limited to 'tests/test_clientmanager.py')
| -rw-r--r-- | tests/test_clientmanager.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/test_clientmanager.py b/tests/test_clientmanager.py deleted file mode 100644 index fe99c599..00000000 --- a/tests/test_clientmanager.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2012-2013 OpenStack, LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -from openstackclient.common import clientmanager -from tests import utils - - -class Container(object): - attr = clientmanager.ClientCache(lambda x: object()) - - def __init__(self): - pass - - -class TestClientManager(utils.TestCase): - def setUp(self): - super(TestClientManager, self).setUp() - - def test_singleton(self): - # NOTE(dtroyer): Verify that the ClientCache descriptor only invokes - # the factory one time and always returns the same value after that. - c = Container() - self.assertEqual(c.attr, c.attr) |
