Skip to content

Commit

Permalink
Unit tests: re-enable skipped record list tests after queryset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed Feb 6, 2024
1 parent 28be6a1 commit 62a1293
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions api_tests/cedar_metadata_records/views/test_record_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 62a1293

Please sign in to comment.