Пример #1
0
def test_get_user_roles():
    responses.add(responses.GET,
                  'http://api/v2/roles/users/666',
                  json=answers.USERS_ROLE_SHOW)

    manager = RolesManager(client)

    result = manager.get_user_roles(user_id=666)

    assert len(result) > 0
Пример #2
0
def test_get_user_raw_roles():
    responses.add(responses.GET,
                  'http://api/v2/roles/users/666',
                  json=answers.USERS_ROLE_SHOW)

    manager = RolesManager(client)

    result = manager.get_user_roles(user_id=666, return_raw=True)

    assert result == answers.USERS_ROLE_SHOW["roles"]