def test_remove_role_from_user(ltd_client: ListTheDocs): ltd_client.add_project(Project('test_project', 'empty description')) ltd_client.add_role( 'root', Role(role_name='PROJECT_MANAGER', project_code='test_project')) ltd_client.remove_role( 'root', Role(role_name='PROJECT_MANAGER', project_code='test_project')) roles = ltd_client.get_roles('root') assert isinstance(roles, list) assert len(roles) == 0
def test_add_role_to_user(ltd_client: ListTheDocs): ltd_client.add_project(Project('test_project', 'empty description')) ltd_client.add_role( 'root', Role(role_name='PROJECT_MANAGER', project_code='test_project')) roles = ltd_client.get_roles('root') assert isinstance(roles, list) assert isinstance(roles[0], Role) assert roles[0].role_name == 'PROJECT_MANAGER' assert roles[0].project_code == 'test_project'