def test_cli_roles_override_decorator_roles():
 @roles('r1')
 def command():
  pass
 eq_effective_roles(command, ['r2'], cli_roles=['r2'], env={'roledefs': fake_roles})

def test_cli_roles_override_decorator_roles ( ) : @ roles ( 'r1' ) def command ( ) : pass eq_effective_roles ( command , [ 'r2' ] , cli_roles = [ 'r2' ] , env = { 'roledefs' : fake_roles } )
if cli roles are provided they replace roles defined in @roles .