@@ -381,6 +381,11 @@ class TestUserList(TestUser):
381381 def setUp (self ):
382382 super (TestUserList , self ).setUp ()
383383
384+ self .projects_mock .get .return_value = fakes .FakeResource (
385+ None ,
386+ copy .deepcopy (identity_fakes .PROJECT_2 ),
387+ loaded = True ,
388+ )
384389 self .projects_mock .list .return_value = [
385390 fakes .FakeResource (
386391 None ,
@@ -408,7 +413,7 @@ def test_user_list_no_options(self):
408413 # DisplayCommandBase.take_action() returns two tuples
409414 columns , data = self .cmd .take_action (parsed_args )
410415
411- self .users_mock .list .assert_called_with ()
416+ self .users_mock .list .assert_called_with (tenant_id = None )
412417
413418 collist = ('ID' , 'Name' )
414419 self .assertEqual (columns , collist )
@@ -426,11 +431,12 @@ def test_user_list_project(self):
426431 ('project' , identity_fakes .project_id ),
427432 ]
428433 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
434+ project_id = identity_fakes .PROJECT_2 ['id' ]
429435
430436 # DisplayCommandBase.take_action() returns two tuples
431437 columns , data = self .cmd .take_action (parsed_args )
432438
433- self .users_mock .list .assert_called_with ()
439+ self .users_mock .list .assert_called_with (tenant_id = project_id )
434440
435441 collist = ('ID' , 'Name' )
436442 self .assertEqual (columns , collist )
@@ -452,7 +458,7 @@ def test_user_list_long(self):
452458 # DisplayCommandBase.take_action() returns two tuples
453459 columns , data = self .cmd .take_action (parsed_args )
454460
455- self .users_mock .list .assert_called_with ()
461+ self .users_mock .list .assert_called_with (tenant_id = None )
456462
457463 collist = ('ID' , 'Name' , 'Project' , 'Email' , 'Enabled' )
458464 self .assertEqual (columns , collist )
0 commit comments