Merge "Fix decorators of properties in AccessToken"
This commit is contained in:
commit
b2cd977eed
@ -599,7 +599,7 @@ class AccessInfoV3(AccessInfo):
|
||||
def username(self):
|
||||
return self._user['name']
|
||||
|
||||
@missingproperty
|
||||
@property
|
||||
def _domain(self):
|
||||
return self._data['token']['domain']
|
||||
|
||||
@ -623,7 +623,7 @@ class AccessInfoV3(AccessInfo):
|
||||
def project_domain_id(self):
|
||||
return self._project['domain']['id']
|
||||
|
||||
@property
|
||||
@missingproperty
|
||||
def project_domain_name(self):
|
||||
return self._project['domain']['name']
|
||||
|
||||
|
@ -62,13 +62,9 @@ class AccessInfoPluginTests(utils.TestCase):
|
||||
def test_project_auth_properties(self):
|
||||
plugin = self._plugin()
|
||||
auth_ref = plugin.auth_ref
|
||||
|
||||
self.assertIsNone(auth_ref.project_domain_id)
|
||||
try:
|
||||
# NOTE(breton): this is currently failing
|
||||
self.assertIsNone(auth_ref.project_domain_name)
|
||||
self.fail()
|
||||
except KeyError:
|
||||
pass
|
||||
self.assertIsNone(auth_ref.project_domain_name)
|
||||
self.assertIsNone(auth_ref.project_id)
|
||||
self.assertIsNone(auth_ref.project_name)
|
||||
|
||||
@ -76,10 +72,5 @@ class AccessInfoPluginTests(utils.TestCase):
|
||||
plugin = self._plugin()
|
||||
auth_ref = plugin.auth_ref
|
||||
|
||||
try:
|
||||
# NOTE(breton): this is currently failing
|
||||
self.assertIsNone(auth_ref.domain_id)
|
||||
self.assertIsNone(auth_ref.domain_name)
|
||||
self.fail()
|
||||
except TypeError:
|
||||
pass
|
||||
self.assertIsNone(auth_ref.domain_id)
|
||||
self.assertIsNone(auth_ref.domain_name)
|
||||
|
Loading…
Reference in New Issue
Block a user