1212
1313import copy
1414
15- from osc_lib import exceptions
16-
1715from openstackclient .identity .v3 import unscoped_saml
1816from openstackclient .tests .unit import fakes
1917from openstackclient .tests .unit .identity .v3 import fakes as identity_fakes
@@ -48,7 +46,6 @@ def setUp(self):
4846 self .cmd = unscoped_saml .ListAccessibleDomains (self .app , None )
4947
5048 def test_accessible_domains_list (self ):
51- self .app .client_manager .auth_plugin_name = 'v3unscopedsaml'
5249 arglist = []
5350 verifylist = []
5451 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
@@ -70,17 +67,6 @@ def test_accessible_domains_list(self):
7067 ), )
7168 self .assertEqual (datalist , tuple (data ))
7269
73- def test_accessible_domains_list_wrong_auth (self ):
74- auth = identity_fakes .FakeAuth ("wrong auth" )
75- self .app .client_manager .identity .session .auth = auth
76- arglist = []
77- verifylist = []
78- parsed_args = self .check_parser (self .cmd , arglist , verifylist )
79-
80- self .assertRaises (exceptions .CommandError ,
81- self .cmd .take_action ,
82- parsed_args )
83-
8470
8571class TestProjectList (TestUnscopedSAML ):
8672
@@ -99,7 +85,6 @@ def setUp(self):
9985 self .cmd = unscoped_saml .ListAccessibleProjects (self .app , None )
10086
10187 def test_accessible_projects_list (self ):
102- self .app .client_manager .auth_plugin_name = 'v3unscopedsaml'
10388 arglist = []
10489 verifylist = []
10590 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
@@ -120,14 +105,3 @@ def test_accessible_projects_list(self):
120105 identity_fakes .project_name ,
121106 ), )
122107 self .assertEqual (datalist , tuple (data ))
123-
124- def test_accessible_projects_list_wrong_auth (self ):
125- auth = identity_fakes .FakeAuth ("wrong auth" )
126- self .app .client_manager .identity .session .auth = auth
127- arglist = []
128- verifylist = []
129- parsed_args = self .check_parser (self .cmd , arglist , verifylist )
130-
131- self .assertRaises (exceptions .CommandError ,
132- self .cmd .take_action ,
133- parsed_args )
0 commit comments