From d47d98ad61e7cba6c36275422e70558211e24b66 Mon Sep 17 00:00:00 2001 From: index-git Date: Tue, 19 Dec 2023 14:08:35 +0100 Subject: [PATCH] Remove replaced tests --- .../single_publication/publications_test.py | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/tests/static_data/single_publication/publications_test.py b/tests/static_data/single_publication/publications_test.py index 8bfb861b9..a1887bdeb 100644 --- a/tests/static_data/single_publication/publications_test.py +++ b/tests/static_data/single_publication/publications_test.py @@ -44,47 +44,6 @@ def test_infos(workspace, publ_type, publication): assert rest_detail['geodata_type'] == exp_geodata_type -@pytest.mark.parametrize('workspace, publ_type, publication', data.LIST_ALL_PUBLICATIONS) -@pytest.mark.usefixtures('oauth2_provider_mock', 'ensure_layman') -def test_auth_get_publications(workspace, publ_type, publication): - ensure_publication(workspace, publ_type, publication) - - all_auth_info = util.get_users_and_headers_for_publication(workspace, publ_type, publication) - headers_list_in = all_auth_info['read'][util.KEY_AUTH][util.KEY_HEADERS] - headers_list_out = all_auth_info['read'][util.KEY_NOT_AUTH][util.KEY_HEADERS] - - for in_headers in headers_list_in: - infos = process_client.get_publications(publ_type, workspace=workspace, headers=in_headers) - publication_names = [li['name'] for li in infos] - assert publication in publication_names, in_headers - - for out_headers in headers_list_out: - infos = process_client.get_publications(publ_type, workspace=workspace, headers=out_headers) - publication_names = [li['name'] for li in infos] - assert publication not in publication_names, out_headers - - -@pytest.mark.parametrize('workspace, publ_type, publication', data.LIST_ALL_PUBLICATIONS) -@pytest.mark.usefixtures('oauth2_provider_mock', 'ensure_layman') -def test_auth_get_publication(workspace, publ_type, publication): - ensure_publication(workspace, publ_type, publication) - - all_auth_info = util.get_users_and_headers_for_publication(workspace, publ_type, publication) - readers = all_auth_info['read'][util.KEY_AUTH][util.KEY_USERS] - non_readers = all_auth_info['read'][util.KEY_NOT_AUTH][util.KEY_USERS] - - for user in readers: - with app.app_context(): - pub_info = layman_util.get_publication_info(workspace, publ_type, publication, {'actor_name': user}) - assert pub_info['name'] == publication, f'pub_info={pub_info}' - assert pub_info['type'] == publ_type, f'pub_info={pub_info}' - - for user in non_readers: - with app.app_context(): - pub_info = layman_util.get_publication_info(workspace, publ_type, publication, {'actor_name': user}) - assert not pub_info, pub_info - - @pytest.mark.parametrize('workspace, publ_type, publication', data.LIST_ALL_PUBLICATIONS) @pytest.mark.usefixtures('oauth2_provider_mock', 'ensure_layman') def test_internal_info(workspace, publ_type, publication):