From 7f2b2c31d04424e83b8b90fac6c70a3e5c11d621 Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Thu, 5 Sep 2024 20:07:20 -0400 Subject: [PATCH] Sync diff between #10739 and #1068 --- api/base/permissions.py | 1 - .../preprints/views/test_preprint_detail_author_assertions.py | 1 - .../preprints/views/test_preprint_institutions_relationship.py | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api/base/permissions.py b/api/base/permissions.py index 670fdd64877..50081b28a9a 100644 --- a/api/base/permissions.py +++ b/api/base/permissions.py @@ -9,7 +9,6 @@ from framework.auth.cas import CasResponse from osf.models import ApiOAuth2Application, ApiOAuth2PersonalToken -from osf.utils import permissions as osf_permissions from website.util.sanitize import is_iterable_but_not_string from api.base.utils import get_user_auth diff --git a/api_tests/preprints/views/test_preprint_detail_author_assertions.py b/api_tests/preprints/views/test_preprint_detail_author_assertions.py index 995b8e09912..63dc8696d41 100644 --- a/api_tests/preprints/views/test_preprint_detail_author_assertions.py +++ b/api_tests/preprints/views/test_preprint_detail_author_assertions.py @@ -39,7 +39,6 @@ def preprint(self, user): preprint.add_contributor(user, READ) return preprint - @pytest.fixture() def url(self, preprint): return f'/{API_BASE}preprints/{preprint._id}/' diff --git a/api_tests/preprints/views/test_preprint_institutions_relationship.py b/api_tests/preprints/views/test_preprint_institutions_relationship.py index beff97e0baf..cd00750c0eb 100644 --- a/api_tests/preprints/views/test_preprint_institutions_relationship.py +++ b/api_tests/preprints/views/test_preprint_institutions_relationship.py @@ -36,9 +36,8 @@ def institution_E(self): def institution_F(self): return InstitutionFactory() - @pytest.fixture() - def admin_with_institutional_affiliation(self, institution_A, institution_B, institution_C, preprint): + def admin_with_institutional_affiliation(self, institution_A, institution_B, institution_C, preprint): user = AuthUserFactory() preprint.add_contributor(user, permissions=ADMIN) user.add_or_update_affiliated_institution(institution_A)