Skip to content

Commit

Permalink
test dataset datatype summary
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rocheleau committed Aug 29, 2023
1 parent 5ab14a6 commit fc1eff6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chord_metadata_service/chord/tests/test_api_datasets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import uuid
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
Expand Down Expand Up @@ -47,6 +48,15 @@ def test_dataset_summary(self):
r = self.client.get(reverse("chord-dataset-summary", kwargs={"dataset_id": self.dataset.identifier}))
self.assertEqual(r.status_code, status.HTTP_200_OK)

def test_dataset_datatype_summary(self):
r = self.client.get(reverse("chord-dataset-data-type-summary", kwargs={"dataset_id": self.dataset.identifier}))
self.assertEqual(r.status_code, status.HTTP_200_OK)

bad_dataset_id = str(uuid.uuid4())
with self.assertRaises(Dataset.DoesNotExist):
r = self.client.get(reverse("chord-dataset-data-type-summary", kwargs={"dataset_id": bad_dataset_id}))
self.assertEqual(r.status_code, status.HTTP_400_BAD_REQUEST)

def test_get_dataset_datatype(self):
for dt in DATA_TYPES:
if DATA_TYPES[dt]['queryable']:
Expand Down

0 comments on commit fc1eff6

Please sign in to comment.