From 62a129381d2586f027c3b937e5879bd860172aa9 Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Tue, 6 Feb 2024 12:13:45 -0500 Subject: [PATCH] Unit tests: re-enable skipped record list tests after queryset fix --- api_tests/cedar_metadata_records/views/test_record_list.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api_tests/cedar_metadata_records/views/test_record_list.py b/api_tests/cedar_metadata_records/views/test_record_list.py index 42416f70fc7..e8810345790 100644 --- a/api_tests/cedar_metadata_records/views/test_record_list.py +++ b/api_tests/cedar_metadata_records/views/test_record_list.py @@ -13,8 +13,6 @@ @pytest.mark.django_db class TestCedarMetadataRecordList(TestCedarMetadataRecord): - # TODO: discuss and fix permission - @pytest.mark.skip(reason='discuss and fix permission') def test_record_list_no_auth(self, app, cedar_draft_record_ids, cedar_published_private_record_ids, cedar_published_public_record_ids): resp = app.get('/_/cedar_metadata_records/') @@ -23,8 +21,6 @@ def test_record_list_no_auth(self, app, cedar_draft_record_ids, cedar_published_ assert len(data) == len(cedar_published_public_record_ids) assert set(cedar_published_public_record_ids) == set([datum['id'] for datum in data]) - # TODO: discuss and fix permission - @pytest.mark.skip(reason='discuss and fix permission') def test_record_list_with_invalid_auth(self, app, user_alt, cedar_draft_record_ids, cedar_published_private_record_ids, cedar_published_public_record_ids): resp = app.get('/_/cedar_metadata_records/', auth=user_alt.auth) @@ -34,7 +30,7 @@ def test_record_list_with_invalid_auth(self, app, user_alt, cedar_draft_record_i assert set(cedar_published_public_record_ids) == set([datum['id'] for datum in data]) # NOTE: Per API contract, we don't actually use this view for listing purpose, thus only published records - # are returned even user can access the unpublished ones + # are returned even user can access the unpublished ones, and thus no need to test read/write/admin separately def test_record_list_with_valid_auth(self, app, user, cedar_draft_record_ids, cedar_published_private_record_ids, cedar_published_public_record_ids): resp = app.get('/_/cedar_metadata_records/', auth=user.auth)