summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reddwarfclient/auth.py2
-rw-r--r--reddwarfclient/users.py4
-rw-r--r--tests/test_auth.py2
3 files changed, 3 insertions, 5 deletions
diff --git a/reddwarfclient/auth.py b/reddwarfclient/auth.py
index a0f6e24..4494447 100644
--- a/reddwarfclient/auth.py
+++ b/reddwarfclient/auth.py
@@ -251,7 +251,7 @@ class ServiceCatalog(object):
if service.get("type") != self.service_type:
continue
- if (self.service_name and self.service_type == 'reddwarf' and
+ if (self.service_name and self.service_type == 'database' and
service.get('name') != self.service_name):
continue
diff --git a/reddwarfclient/users.py b/reddwarfclient/users.py
index 7da5ae7..505703c 100644
--- a/reddwarfclient/users.py
+++ b/reddwarfclient/users.py
@@ -86,9 +86,7 @@ class Users(base.ManagerWithFind):
"""
username = quote(user)
url = "/instances/%s/users/%s" % (instance_id, username)
- resp, body = self.api.client.get(url)
- check_for_exceptions(resp, body)
- return self.resource_class(self, body)
+ return self._get(url, "user")
def list_access(self, instance, user):
"""Show all databases the given user has access to. """
diff --git a/tests/test_auth.py b/tests/test_auth.py
index 58b0b93..f1c4b59 100644
--- a/tests/test_auth.py
+++ b/tests/test_auth.py
@@ -400,7 +400,7 @@ class ServiceCatalogTest(TestCase):
scObj.catalog[scObj.root_key]['serviceCatalog'] = [service1]
self.assertRaises(exceptions.EndpointNotFound, scObj._url_for)
- scObj.service_type = "reddwarf"
+ scObj.service_type = "database"
scObj.service_name = "no_match"
self.assertRaises(exceptions.EndpointNotFound, scObj._url_for)