@@ -124,25 +124,25 @@ def take_action(self, parsed_args):
124124
125125class TestNetworkAndCompute (utils .TestCommand ):
126126 def setUp (self ):
127- super (TestNetworkAndCompute , self ).setUp ()
127+ super ().setUp ()
128128
129129 self .namespace = argparse .Namespace ()
130130
131- # Create network client mocks.
131+ # Create client mocks. Note that we intentionally do not use specced
132+ # mocks since we want to test fake methods.
133+
132134 self .app .client_manager .network = mock .Mock ()
133135 self .network_client = self .app .client_manager .network
134136 self .network_client .network_action = mock .Mock (
135137 return_value = 'take_action_network'
136138 )
137139
138- # Create compute client mocks.
139140 self .app .client_manager .compute = mock .Mock ()
140141 self .compute = self .app .client_manager .compute
141142 self .compute .compute_action = mock .Mock (
142143 return_value = 'take_action_compute'
143144 )
144145
145- # Subclasses can override the command object to test.
146146 self .cmd = FakeNetworkAndComputeCommand (self .app , self .namespace )
147147
148148 def test_take_action_network (self ):
@@ -209,6 +209,9 @@ def setUp(self):
209209
210210 self .namespace = argparse .Namespace ()
211211
212+ # Create client mocks. Note that we intentionally do not use specced
213+ # mocks since we want to test fake methods.
214+
212215 self .app .client_manager .network = mock .Mock ()
213216 self .network_client = self .app .client_manager .network
214217 self .network_client .test_create_action = mock .Mock ()
0 commit comments