1717from osc_lib import exceptions
1818
1919from openstackclient .network .v2 import address_scope
20- from openstackclient .tests import fakes
2120from openstackclient .tests .identity .v3 import fakes as identity_fakes_v3
2221from openstackclient .tests .network .v2 import fakes as network_fakes
2322from openstackclient .tests import utils as tests_utils
@@ -30,6 +29,10 @@ def setUp(self):
3029
3130 # Get a shortcut to the network client
3231 self .network = self .app .client_manager .network
32+ # Get a shortcut to the ProjectManager Mock
33+ self .projects_mock = self .app .client_manager .identity .projects
34+ # Get a shortcut to the DomainManager Mock
35+ self .domains_mock = self .app .client_manager .identity .domains
3336
3437
3538class TestCreateAddressScope (TestAddressScope ):
@@ -66,20 +69,7 @@ def setUp(self):
6669 # Get the command object to test
6770 self .cmd = address_scope .CreateAddressScope (self .app , self .namespace )
6871
69- # Set identity client v3. And get a shortcut to Identity client.
70- identity_client = identity_fakes_v3 .FakeIdentityv3Client (
71- endpoint = fakes .AUTH_URL ,
72- token = fakes .AUTH_TOKEN ,
73- )
74- self .app .client_manager .identity = identity_client
75- self .identity = self .app .client_manager .identity
76-
77- # Get a shortcut to the ProjectManager Mock
78- self .projects_mock = self .identity .projects
7972 self .projects_mock .get .return_value = self .project
80-
81- # Get a shortcut to the DomainManager Mock
82- self .domains_mock = self .identity .domains
8373 self .domains_mock .get .return_value = self .domain
8474
8575 def test_create_no_options (self ):
0 commit comments