@@ -367,6 +367,39 @@ def test_role_list_no_options(self):
367367 ), )
368368 self .assertEqual (datalist , tuple (data ))
369369
370+ def test_user_list_inherited (self ):
371+ arglist = [
372+ '--user' , identity_fakes .user_id ,
373+ '--inherited' ,
374+ ]
375+ verifylist = [
376+ ('user' , identity_fakes .user_id ),
377+ ('inherited' , True ),
378+ ]
379+ parsed_args = self .check_parser (self .cmd , arglist , verifylist )
380+
381+ # DisplayCommandBase.take_action() returns two tuples
382+ columns , data = self .cmd .take_action (parsed_args )
383+
384+ # Set expected values
385+ kwargs = {
386+ 'domain' : 'default' ,
387+ 'user' : self .users_mock .get (),
388+ 'os_inherit_extension_inherited' : True ,
389+ }
390+ # RoleManager.list(user=, group=, domain=, project=, **kwargs)
391+ self .roles_mock .list .assert_called_with (
392+ ** kwargs
393+ )
394+
395+ collist = ('ID' , 'Name' )
396+ self .assertEqual (collist , columns )
397+ datalist = ((
398+ identity_fakes .role_id ,
399+ identity_fakes .role_name ,
400+ ), )
401+ self .assertEqual (datalist , tuple (data ))
402+
370403 def test_user_list_user (self ):
371404 arglist = [
372405 '--user' , identity_fakes .user_id ,
0 commit comments