

def test_can_add_remove_user_with_role(self):
    with user_generator(self.manager, name='test2') as user:
        with user_and_project_generator(_user.manager) as (_user, project):
            self.manager.add_to_project(user, project)
            project = self.manager.get_project('testproj')
            self.manager.add_role(user, 'developer', project)
            self.assertTrue(self.manager.is_project_member(user, project))
            self.manager.remove_from_project(user, project)
            project = self.manager.get_project('testproj')
            self.assertFalse(self.manager.has_role(user, 'developer', project))
            self.assertFalse(self.manager.is_project_member(user, project))

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_auth.py _AuthManagerBaseTestCase.test_can_add_remove_user_with_role/VarMisuse@29/44 `self`->`_user`