mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-23 14:36:39 +02:00
Clone Corres2math platform
This commit is contained in:
27
tfjm/tests.py
Normal file
27
tfjm/tests.py
Normal file
@ -0,0 +1,27 @@
|
||||
# Copyright (C) 2020 by Animath
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import os
|
||||
|
||||
from django.core.handlers.asgi import ASGIHandler
|
||||
from django.core.handlers.wsgi import WSGIHandler
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class TestLoadModules(TestCase):
|
||||
"""
|
||||
Load modules that are not used in development mode in order to increase coverage.
|
||||
"""
|
||||
def test_asgi(self):
|
||||
from tfjm import asgi
|
||||
self.assertTrue(isinstance(asgi.application, ASGIHandler))
|
||||
|
||||
def test_wsgi(self):
|
||||
from tfjm import wsgi
|
||||
self.assertTrue(isinstance(wsgi.application, WSGIHandler))
|
||||
|
||||
def test_load_production_settings(self):
|
||||
os.putenv("TFJM_STAGE", "prod")
|
||||
os.putenv("DJANGO_DB_TYPE", "postgres")
|
||||
from tfjm import settings_prod
|
||||
self.assertFalse(settings_prod.DEBUG)
|
Reference in New Issue
Block a user