From fc38b383ea99df7f0c26bd94d04445c88527d566 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Wed, 15 Aug 2018 21:46:56 +0200 Subject: Use viewsets and the `rest_framework` router. --- api/tests/__init__.py | 0 api/tests/test_snake_names.py | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 api/tests/__init__.py create mode 100644 api/tests/test_snake_names.py (limited to 'api/tests') diff --git a/api/tests/__init__.py b/api/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/api/tests/test_snake_names.py b/api/tests/test_snake_names.py new file mode 100644 index 00000000..14574311 --- /dev/null +++ b/api/tests/test_snake_names.py @@ -0,0 +1,10 @@ +from django_hosts.resolvers import reverse +from rest_framework.test import APITestCase, force_authenticate + + +class EmptyDatabaseSnakeNameTests(APITestCase): + def test_endpoint_returns_empty_list(self): + import pdb; pdb.set_trace() + url = reverse('snake-names-list', host='api') + response = self.client.get(url) + self.assertEqual(response.status_code, 200) -- cgit v1.2.3