summaryrefslogtreecommitdiff
path: root/keystoneclient/tests/unit
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@gmail.com>2016-08-24 17:37:07 +1000
committerJamie Lennox <jamielennox@gmail.com>2016-08-24 18:52:36 +1000
commitf557170404ec2b7f5c562e55ad212b6e444655c8 (patch)
treead5dde2988ffd86e56c0194a772f2a77c5abdf23 /keystoneclient/tests/unit
parent4b8158f9b499646aa80dadf8594a9efa4ef57b14 (diff)
downloadpython-keystoneclient-f557170404ec2b7f5c562e55ad212b6e444655c8.tar.gz
Use AUTH_INTERFACE object from keystoneauth
As keystoneclient and other services rely more on keystoneauth we should assume that keystoneauth is our base auth library, not keystoneclient and start to default to the objects provided from there. This will make it easier to remove these objects when the time comes. Use the AUTH_INTERFACE special object from keystoneauth in most places. This uses it everywhere that is actually session independant. For example it is not changed within the keystoneclient auth plugins themselves as they are directly compatible with keystoneauth. Change-Id: Ibc1224fca98c852106feb78c624b0b2f22b3a19d
Diffstat (limited to 'keystoneclient/tests/unit')
-rw-r--r--keystoneclient/tests/unit/auth/test_access.py8
-rw-r--r--keystoneclient/tests/unit/auth/test_identity_common.py5
2 files changed, 7 insertions, 6 deletions
diff --git a/keystoneclient/tests/unit/auth/test_access.py b/keystoneclient/tests/unit/auth/test_access.py
index 640fb7d..f5f5843 100644
--- a/keystoneclient/tests/unit/auth/test_access.py
+++ b/keystoneclient/tests/unit/auth/test_access.py
@@ -13,9 +13,9 @@
import uuid
from keystoneauth1 import fixture
+from keystoneauth1 import plugin
from keystoneclient import access
-from keystoneclient import auth
from keystoneclient.auth.identity import access as access_plugin
from keystoneclient import session
from keystoneclient.tests.unit import utils
@@ -49,11 +49,11 @@ class AccessInfoPluginTests(utils.TestCase):
def test_auth_url(self):
auth_url = 'http://keystone.test.url'
- plugin = self._plugin(auth_url=auth_url)
+ plug = self._plugin(auth_url=auth_url)
self.assertEqual(auth_url,
- plugin.get_endpoint(self.session,
- interface=auth.AUTH_INTERFACE))
+ plug.get_endpoint(self.session,
+ interface=plugin.AUTH_INTERFACE))
def test_invalidate(self):
plugin = self._plugin()
diff --git a/keystoneclient/tests/unit/auth/test_identity_common.py b/keystoneclient/tests/unit/auth/test_identity_common.py
index 9fb0357..5793672 100644
--- a/keystoneclient/tests/unit/auth/test_identity_common.py
+++ b/keystoneclient/tests/unit/auth/test_identity_common.py
@@ -15,6 +15,7 @@ import datetime
import uuid
from keystoneauth1 import fixture
+from keystoneauth1 import plugin
import mock
from oslo_utils import timeutils
import six
@@ -191,7 +192,7 @@ class CommonIdentityTests(object):
s = session.Session(auth=a)
auth_url = s.get_endpoint(service_type='compute',
- interface=base.AUTH_INTERFACE)
+ interface=plugin.AUTH_INTERFACE)
self.assertEqual(self.TEST_URL, auth_url)
@@ -402,7 +403,7 @@ class CatalogHackTests(utils.TestCase):
sess = session.Session(auth=v2_auth)
- endpoint = sess.get_endpoint(interface=base.AUTH_INTERFACE,
+ endpoint = sess.get_endpoint(interface=plugin.AUTH_INTERFACE,
version=(3, 0))
self.assertEqual(self.V3_URL, endpoint)