@@ -285,7 +285,8 @@ def test_security_group_list_no_options(self):
285285
286286 columns , data = self .cmd .take_action (parsed_args )
287287
288- self .network .security_groups .assert_called_once_with ()
288+ self .network .security_groups .assert_called_once_with (
289+ fields = security_group .ListSecurityGroup .FIELDS_TO_RETRIEVE )
289290 self .assertEqual (self .columns , columns )
290291 self .assertListItemEqual (self .data , list (data ))
291292
@@ -300,7 +301,8 @@ def test_security_group_list_all_projects(self):
300301
301302 columns , data = self .cmd .take_action (parsed_args )
302303
303- self .network .security_groups .assert_called_once_with ()
304+ self .network .security_groups .assert_called_once_with (
305+ fields = security_group .ListSecurityGroup .FIELDS_TO_RETRIEVE )
304306 self .assertEqual (self .columns , columns )
305307 self .assertListItemEqual (self .data , list (data ))
306308
@@ -316,7 +318,9 @@ def test_security_group_list_project(self):
316318 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
317319
318320 columns , data = self .cmd .take_action (parsed_args )
319- filters = {'tenant_id' : project .id , 'project_id' : project .id }
321+ filters = {
322+ 'tenant_id' : project .id , 'project_id' : project .id ,
323+ 'fields' : security_group .ListSecurityGroup .FIELDS_TO_RETRIEVE }
320324
321325 self .network .security_groups .assert_called_once_with (** filters )
322326 self .assertEqual (self .columns , columns )
@@ -336,7 +340,9 @@ def test_security_group_list_project_domain(self):
336340 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
337341
338342 columns , data = self .cmd .take_action (parsed_args )
339- filters = {'tenant_id' : project .id , 'project_id' : project .id }
343+ filters = {
344+ 'tenant_id' : project .id , 'project_id' : project .id ,
345+ 'fields' : security_group .ListSecurityGroup .FIELDS_TO_RETRIEVE }
340346
341347 self .network .security_groups .assert_called_once_with (** filters )
342348 self .assertEqual (self .columns , columns )
@@ -362,7 +368,8 @@ def test_list_with_tag_options(self):
362368 ** {'tags' : 'red,blue' ,
363369 'any_tags' : 'red,green' ,
364370 'not_tags' : 'orange,yellow' ,
365- 'not_any_tags' : 'black,white' }
371+ 'not_any_tags' : 'black,white' ,
372+ 'fields' : security_group .ListSecurityGroup .FIELDS_TO_RETRIEVE }
366373 )
367374 self .assertEqual (self .columns , columns )
368375 self .assertEqual (self .data , list (data ))
0 commit comments