

def test_adding_role_to_project_is_ignored_unless_added_to_user(self):
    with user_and_project_generator(self.manager) as (user, project):
        self.assertFalse(self.manager.has_role(user, 'sysadmin', project))
        self.manager.add_role(user, 'sysadmin', project)
        self.assertFalse(self.manager.has_role(user, 'sysadmin', project))
        self.manager.add_role(user, 'sysadmin')
        self.assertTrue(self.manager.has_role(user, 'sysadmin', project))

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_auth.py _AuthManagerBaseTestCase.test_adding_role_to_project_is_ignored_unless_added_to_user/original