Import module instead of object

Change-Id: I17dbbd1ca4b940596c913d58a11bd83f19993bb6
This commit is contained in:
Anh Tran
2016-09-27 10:46:20 +07:00
parent ec930d1b32
commit 4aa20fcece

View File

@@ -13,7 +13,7 @@
import uuid import uuid
from keystoneauth1.exceptions import http from keystoneauth1.exceptions import http
from keystoneclient.exceptions import ValidationError from keystoneclient import exceptions
from keystoneclient.tests.functional import base from keystoneclient.tests.functional import base
from keystoneclient.tests.functional.v3 import client_fixtures as fixtures from keystoneclient.tests.functional.v3 import client_fixtures as fixtures
@@ -88,7 +88,7 @@ class RolesTestCase(base.V3ClientTestCase):
# Only filter in role grants for a user on a resource. # Only filter in role grants for a user on a resource.
# Domain or project should be specified. # Domain or project should be specified.
self.assertRaises(ValidationError, self.assertRaises(exceptions.ValidationError,
self.client.roles.list, self.client.roles.list,
user=user.id) user=user.id)
@@ -97,7 +97,7 @@ class RolesTestCase(base.V3ClientTestCase):
group = fixtures.Group(self.client, self.project_domain_id) group = fixtures.Group(self.client, self.project_domain_id)
self.useFixture(group) self.useFixture(group)
self.assertRaises(ValidationError, self.assertRaises(exceptions.ValidationError,
self.client.roles.list, self.client.roles.list,
group=group.id) group=group.id)
@@ -140,7 +140,7 @@ class RolesTestCase(base.V3ClientTestCase):
# Only grant role to a group on a resource. # Only grant role to a group on a resource.
# Domain or project must be specified. # Domain or project must be specified.
self.assertRaises(ValidationError, self.assertRaises(exceptions.ValidationError,
self.client.roles.grant, self.client.roles.grant,
role.id, role.id,
user=user.id) user=user.id)
@@ -150,7 +150,7 @@ class RolesTestCase(base.V3ClientTestCase):
# Only grant role to a group on a resource. # Only grant role to a group on a resource.
# Domain or project must be specified. # Domain or project must be specified.
self.assertRaises(ValidationError, self.assertRaises(exceptions.ValidationError,
self.client.roles.grant, self.client.roles.grant,
role.id, role.id,
group=group.id) group=group.id)