Coverage for ivatar/test_wsgi.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2024-12-26 00:11 +0000

1# -*- coding: utf-8 -*- 

2""" 

3Unit tests for WSGI 

4""" 

5import unittest 

6 

7import os 

8import django 

9 

10os.environ["DJANGO_SETTINGS_MODULE"] = "ivatar.settings" 

11django.setup() 

12 

13 

14class TestCase(unittest.TestCase): 

15 """ 

16 Simple testcase to see if WSGI loads correctly 

17 """ 

18 

19 def test_run_wsgi(self): 

20 """ 

21 Run wsgi import 

22 """ 

23 import ivatar.wsgi # pylint: disable=import-outside-toplevel 

24 

25 self.assertEqual( 

26 ivatar.wsgi.application.__class__, django.core.handlers.wsgi.WSGIHandler 

27 )