Files
edx-platform/lms/tests.py
Ned Batchelder d585a8f71d URLs and settings for OpenAPI generation
API docs are now always available, no more toggle to enable them.
2019-09-17 16:54:27 -04:00

33 lines
810 B
Python

"""Tests for the lms module itself."""
from __future__ import absolute_import
import logging
import mimetypes
from django.conf import settings
from django.test import TestCase
from edxmako import LOOKUP, add_lookup
log = logging.getLogger(__name__)
class LmsModuleTests(TestCase):
"""
Tests for lms module itself.
"""
def test_new_mimetypes(self):
extensions = ['eot', 'otf', 'ttf', 'woff']
for extension in extensions:
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.
"""
response = self.client.get('/api-docs/')
self.assertEqual(200, response.status_code)