______________________________________________________ test_getting_list_of_oauth2_clients_by_authorized_user[auth_scopes0] ______________________________________________________ flask_app_client = > regular_user = regular_user_oauth2_client = , auth_scopes = ['auth:read'] @pytest.mark.parametrize('auth_scopes', ( ['auth:read'], ['auth:read', 'auth:write'], )) def test_getting_list_of_oauth2_clients_by_authorized_user( flask_app_client, regular_user, regular_user_oauth2_client, auth_scopes ): # pylint: disable=invalid-name with flask_app_client.login(regular_user, auth_scopes=auth_scopes): response = flask_app_client.get( '/api/v1/auth/oauth2_clients/', query_string={'user_id': regular_user.id} ) assert response.status_code == 200 assert response.content_type == 'application/json' assert isinstance(response.json, list) assert set(response.json[0].keys()) >= {'client_id'} > assert response.json[0]['client_id'] == regular_user_oauth2_client.client_id E AssertionError: assert 'OAUTH2_regular_user' == 'regular_user_client' E - OAUTH2_regular_user E + regular_user_client tests/modules/auth/resources/test_getting_oauth2clients_info.py:24: AssertionError ______________________________________________________ test_getting_list_of_oauth2_clients_by_authorized_user[auth_scopes1] ______________________________________________________ flask_app_client = > regular_user = regular_user_oauth2_client = , auth_scopes = ['auth:read', 'auth:write'] @pytest.mark.parametrize('auth_scopes', ( ['auth:read'], ['auth:read', 'auth:write'], )) def test_getting_list_of_oauth2_clients_by_authorized_user( flask_app_client, regular_user, regular_user_oauth2_client, auth_scopes ): # pylint: disable=invalid-name with flask_app_client.login(regular_user, auth_scopes=auth_scopes): response = flask_app_client.get( '/api/v1/auth/oauth2_clients/', query_string={'user_id': regular_user.id} ) assert response.status_code == 200 assert response.content_type == 'application/json' assert isinstance(response.json, list) assert set(response.json[0].keys()) >= {'client_id'} > assert response.json[0]['client_id'] == regular_user_oauth2_client.client_id E AssertionError: assert 'OAUTH2_regular_user' == 'regular_user_client' E - OAUTH2_regular_user E + regular_user_client tests/modules/auth/resources/test_getting_oauth2clients_info.py:24: AssertionError ____________________________________________________ test_teams_options_authorized[/api/v1/teams/1-expected_allowed_methods1] ____________________________________________________ path = '/api/v1/teams/1', expected_allowed_methods = {'DELETE', 'GET', 'OPTIONS', 'PATCH'}, flask_app_client = > regular_user = team_for_regular_user = , team_for_nobody = @pytest.mark.parametrize('path,expected_allowed_methods', ( ('/api/v1/teams/', {'GET', 'POST', 'OPTIONS'}), ('/api/v1/teams/1', {'GET', 'OPTIONS', 'PATCH', 'DELETE'}), ('/api/v1/teams/2', {'OPTIONS'}), )) def test_teams_options_authorized( path, expected_allowed_methods, flask_app_client, regular_user, team_for_regular_user, team_for_nobody ): with flask_app_client.login(regular_user, auth_scopes=('teams:write', 'teams:read')): response = flask_app_client.options(path) > assert response.status_code == 204 E assert 404 == 204 E + where 404 = .status_code tests/modules/teams/resources/test_options.py:30: AssertionError ____________________________________________________ test_teams_options_authorized[/api/v1/teams/2-expected_allowed_methods2] ____________________________________________________ path = '/api/v1/teams/2', expected_allowed_methods = {'OPTIONS'}, flask_app_client = > regular_user = team_for_regular_user = , team_for_nobody = @pytest.mark.parametrize('path,expected_allowed_methods', ( ('/api/v1/teams/', {'GET', 'POST', 'OPTIONS'}), ('/api/v1/teams/1', {'GET', 'OPTIONS', 'PATCH', 'DELETE'}), ('/api/v1/teams/2', {'OPTIONS'}), )) def test_teams_options_authorized( path, expected_allowed_methods, flask_app_client, regular_user, team_for_regular_user, team_for_nobody ): with flask_app_client.login(regular_user, auth_scopes=('teams:write', 'teams:read')): response = flask_app_client.options(path) > assert response.status_code == 204 E assert 404 == 204 E + where 404 = .status_code tests/modules/teams/resources/test_options.py:30: AssertionError ===================================================================== 4 failed, 177 passed in 12.61 seconds ======================================================================