summaryrefslogtreecommitdiff
path: root/openstackclient/tests/identity/v3/test_unscoped_saml.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/tests/identity/v3/test_unscoped_saml.py')
-rw-r--r--openstackclient/tests/identity/v3/test_unscoped_saml.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/openstackclient/tests/identity/v3/test_unscoped_saml.py b/openstackclient/tests/identity/v3/test_unscoped_saml.py
index c2f14493..d12cb454 100644
--- a/openstackclient/tests/identity/v3/test_unscoped_saml.py
+++ b/openstackclient/tests/identity/v3/test_unscoped_saml.py
@@ -30,23 +30,23 @@ class TestUnscopedSAML(identity_fakes.TestFederatedIdentity):
self.domains_mock.reset_mock()
-class TestProjectList(TestUnscopedSAML):
+class TestDomainList(TestUnscopedSAML):
def setUp(self):
- super(TestProjectList, self).setUp()
+ super(TestDomainList, self).setUp()
- self.projects_mock.list.return_value = [
+ self.domains_mock.list.return_value = [
fakes.FakeResource(
None,
- copy.deepcopy(identity_fakes.PROJECT),
+ copy.deepcopy(identity_fakes.DOMAIN),
loaded=True,
),
]
# Get the command object to test
- self.cmd = unscoped_saml.ListAccessibleProjects(self.app, None)
+ self.cmd = unscoped_saml.ListAccessibleDomains(self.app, None)
- def test_accessible_projects_list(self):
+ def test_accessible_domains_list(self):
self.app.client_manager.auth_plugin_name = 'v3unscopedsaml'
arglist = []
verifylist = []
@@ -57,19 +57,19 @@ class TestProjectList(TestUnscopedSAML):
# containing the data to be listed.
columns, data = self.cmd.take_action(parsed_args)
- self.projects_mock.list.assert_called_with()
+ self.domains_mock.list.assert_called_with()
- collist = ('ID', 'Domain ID', 'Enabled', 'Name')
+ collist = ('ID', 'Enabled', 'Name', 'Description')
self.assertEqual(collist, columns)
datalist = ((
- identity_fakes.project_id,
identity_fakes.domain_id,
True,
- identity_fakes.project_name,
+ identity_fakes.domain_name,
+ identity_fakes.domain_description,
), )
self.assertEqual(datalist, tuple(data))
- def test_accessible_projects_list_wrong_auth(self):
+ def test_accessible_domains_list_wrong_auth(self):
auth = identity_fakes.FakeAuth("wrong auth")
self.app.client_manager.identity.session.auth = auth
arglist = []
@@ -81,23 +81,23 @@ class TestProjectList(TestUnscopedSAML):
parsed_args)
-class TestDomainList(TestUnscopedSAML):
+class TestProjectList(TestUnscopedSAML):
def setUp(self):
- super(TestDomainList, self).setUp()
+ super(TestProjectList, self).setUp()
- self.domains_mock.list.return_value = [
+ self.projects_mock.list.return_value = [
fakes.FakeResource(
None,
- copy.deepcopy(identity_fakes.DOMAIN),
+ copy.deepcopy(identity_fakes.PROJECT),
loaded=True,
),
]
# Get the command object to test
- self.cmd = unscoped_saml.ListAccessibleDomains(self.app, None)
+ self.cmd = unscoped_saml.ListAccessibleProjects(self.app, None)
- def test_accessible_domains_list(self):
+ def test_accessible_projects_list(self):
self.app.client_manager.auth_plugin_name = 'v3unscopedsaml'
arglist = []
verifylist = []
@@ -108,19 +108,19 @@ class TestDomainList(TestUnscopedSAML):
# containing the data to be listed.
columns, data = self.cmd.take_action(parsed_args)
- self.domains_mock.list.assert_called_with()
+ self.projects_mock.list.assert_called_with()
- collist = ('ID', 'Enabled', 'Name', 'Description')
+ collist = ('ID', 'Domain ID', 'Enabled', 'Name')
self.assertEqual(collist, columns)
datalist = ((
+ identity_fakes.project_id,
identity_fakes.domain_id,
True,
- identity_fakes.domain_name,
- identity_fakes.domain_description,
+ identity_fakes.project_name,
), )
self.assertEqual(datalist, tuple(data))
- def test_accessible_domains_list_wrong_auth(self):
+ def test_accessible_projects_list_wrong_auth(self):
auth = identity_fakes.FakeAuth("wrong auth")
self.app.client_manager.identity.session.auth = auth
arglist = []