1111# under the License.
1212#
1313
14- import argparse
1514from unittest import mock
1615
1716import openstack
@@ -126,8 +125,6 @@ class TestNetworkAndCompute(utils.TestCommand):
126125 def setUp (self ):
127126 super ().setUp ()
128127
129- self .namespace = argparse .Namespace ()
130-
131128 # Create client mocks. Note that we intentionally do not use specced
132129 # mocks since we want to test fake methods.
133130
@@ -143,7 +140,7 @@ def setUp(self):
143140 return_value = 'take_action_compute'
144141 )
145142
146- self .cmd = FakeNetworkAndComputeCommand (self .app , self . namespace )
143+ self .cmd = FakeNetworkAndComputeCommand (self .app , None )
147144
148145 def test_take_action_network (self ):
149146 arglist = ['common' , 'network' ]
@@ -168,19 +165,19 @@ def test_take_action_compute(self):
168165class TestNetworkAndComputeCommand (TestNetworkAndCompute ):
169166 def setUp (self ):
170167 super (TestNetworkAndComputeCommand , self ).setUp ()
171- self .cmd = FakeNetworkAndComputeCommand (self .app , self . namespace )
168+ self .cmd = FakeNetworkAndComputeCommand (self .app , None )
172169
173170
174171class TestNetworkAndComputeLister (TestNetworkAndCompute ):
175172 def setUp (self ):
176173 super (TestNetworkAndComputeLister , self ).setUp ()
177- self .cmd = FakeNetworkAndComputeLister (self .app , self . namespace )
174+ self .cmd = FakeNetworkAndComputeLister (self .app , None )
178175
179176
180177class TestNetworkAndComputeShowOne (TestNetworkAndCompute ):
181178 def setUp (self ):
182179 super (TestNetworkAndComputeShowOne , self ).setUp ()
183- self .cmd = FakeNetworkAndComputeShowOne (self .app , self . namespace )
180+ self .cmd = FakeNetworkAndComputeShowOne (self .app , None )
184181
185182 def test_take_action_with_http_exception (self ):
186183 with mock .patch .object (self .cmd , 'take_action_network' ) as m_action :
@@ -207,8 +204,6 @@ class TestNeutronCommandWithExtraArgs(utils.TestCommand):
207204 def setUp (self ):
208205 super (TestNeutronCommandWithExtraArgs , self ).setUp ()
209206
210- self .namespace = argparse .Namespace ()
211-
212207 # Create client mocks. Note that we intentionally do not use specced
213208 # mocks since we want to test fake methods.
214209
@@ -217,9 +212,7 @@ def setUp(self):
217212 self .network_client .test_create_action = mock .Mock ()
218213
219214 # Subclasses can override the command object to test.
220- self .cmd = FakeCreateNeutronCommandWithExtraArgs (
221- self .app , self .namespace
222- )
215+ self .cmd = FakeCreateNeutronCommandWithExtraArgs (self .app , None )
223216
224217 def test_create_extra_attributes_default_type (self ):
225218 arglist = [
0 commit comments