Skip to content

Commit

Permalink
test: public search fields with large cell counts
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Sep 1, 2023
1 parent 1be757d commit 7e3b760
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chord_metadata_service/patients/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,15 @@ def test_public_filtering_mapping_for_search_filter(self):
response_obj = response.json()
self.assertEqual(1, response_obj["count"])

@override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST)
def test_public_overview_sex(self):
response = self.client.get('/api/public_search_fields')
self.assertEqual(response.status_code, status.HTTP_200_OK)
response_obj = response.json()

# overview for sex should have entries due to large cell counts: MALE, FEMALE, UNKNOWN, OTHER
self.assertEqual(len(response_obj["sections"][0]["fields"][0]["options"]), 4) # path to sex field


class PublicFilteringIndividualsTestSmallCellCount(PublicFilteringIndividualsTest):
num_individuals = 3 # below configured test threshold
Expand Down

0 comments on commit 7e3b760

Please sign in to comment.