Coverage for conf/asgi.py: 55%

14 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 06:14 +0000

1import os 

2 

3from django.conf import settings 

4from django.contrib.staticfiles.handlers import ASGIStaticFilesHandler 

5 

6from django_asgi_lifespan.asgi import get_asgi_application 

7 

8 

9os.environ.setdefault("DJANGO_SETTINGS_MODULE", "conf.settings") 

10 

11 

12application = get_asgi_application() 

13 

14 

15if settings.ENVIRONMENT == "local": 15 ↛ 19line 15 didn't jump to line 19 because the condition on line 15 was always true

16 application = ASGIStaticFilesHandler(application) 

17 

18 

19if settings.GC_DEBUG_LOGGING: 19 ↛ 20line 19 didn't jump to line 20 because the condition on line 19 was never true

20 import gc 

21 

22 setting = 0 

23 for flag in settings.GC_DEBUG_LOGGING: 

24 setting |= getattr(gc, flag) 

25 

26 gc.set_debug(setting)