diff options
author | 2018-08-16 20:53:38 +0200 | |
---|---|---|
committer | 2018-08-16 20:53:38 +0200 | |
commit | a32fdf1521515506d4bb64fa2d706d2070595003 (patch) | |
tree | eef95582f7ae8e6c17eee208daf84fcaa2a48a17 /api | |
parent | Namespace `bot` endpoints. (diff) |
Small documentation fixes.
Diffstat (limited to 'api')
-rw-r--r-- | api/tests/base.py | 2 | ||||
-rw-r--r-- | api/viewsets.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/api/tests/base.py b/api/tests/base.py index 01286ca0..aa8157bc 100644 --- a/api/tests/base.py +++ b/api/tests/base.py @@ -22,7 +22,7 @@ class APISubdomainTestCase(APITestCase): >>> from api.test.base import APISubdomainTestCase >>> class UnauthedUserTestCase(APISubdomainTestCase): ... def setUp(self): - ... super().setUp(self) + ... super().setUp() ... self.client.force_authentication(user=None) ... def test_can_read_objects_at_my_endpoint(self): ... resp = self.client.get('/my-publicly-readable-endpoint') diff --git a/api/viewsets.py b/api/viewsets.py index 97b0f552..5e38bdc9 100644 --- a/api/viewsets.py +++ b/api/viewsets.py @@ -11,7 +11,7 @@ class SnakeNameViewSet(ViewSet): ## Routes ### GET /bot/snake-names - By default, return a single random snake name in the following format: + By default, return a single random snake name as JSON in the following format: >>> { ... 'name': "Python", @@ -27,6 +27,9 @@ class SnakeNameViewSet(ViewSet): ... {'name': "Python 3", 'scientific': "Langus greatus"}, ... {'name': "Python 2", 'scientific': "Langus decentus"} ... ] + + ## Authentication + Requires a API token. """ serializer_class = SnakeNameSerializer |