Remove GenericAPIView subclass from grades API views; add a test that /api-docs/ works.
This commit is contained in:
committed by
Alex Dusenbery
parent
2fc129fcda
commit
99705e54a6
11
lms/tests.py
11
lms/tests.py
@@ -3,8 +3,9 @@
|
||||
import logging
|
||||
import mimetypes
|
||||
|
||||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
from mock import patch
|
||||
from six import text_type
|
||||
|
||||
@@ -29,6 +30,14 @@ class LmsModuleTests(TestCase):
|
||||
mimetype, _ = mimetypes.guess_type('test.' + extension)
|
||||
self.assertIsNotNone(mimetype)
|
||||
|
||||
def test_api_docs(self):
|
||||
"""
|
||||
Tests that requests to the `/api-docs/` endpoint do not raise an exception.
|
||||
"""
|
||||
assert settings.FEATURES['ENABLE_API_DOCS']
|
||||
response = self.client.get('/api-docs/')
|
||||
self.assertEqual(200, response.status_code)
|
||||
|
||||
|
||||
class TemplateLookupTests(TestCase):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user