Files
edx-platform/lms/tests.py
M. Zulqarnain fc06846cb0 BOM-2368: pyupgrade in LMS Directory (#26649)
* pyupgrade in lms dir

* replace wildcard

* pep8 fix

* fix quality
2021-02-23 12:36:00 +05:00

29 lines
741 B
Python

"""Tests for the lms module itself.""" # lint-amnesty, pylint: disable=django-not-configured
import logging
import mimetypes
from django.test import TestCase
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)
assert mimetype is not None
def test_api_docs(self):
"""
Tests that requests to the `/api-docs/` endpoint do not raise an exception.
"""
response = self.client.get('/api-docs/')
assert response.status_code == 200