Coverage for tests/test_app/management/commands/dj_params1.py: 83%

10 statements  

« prev     ^ index     » next       coverage.py v7.3.4, created at 2024-01-20 18:02 +0000

1from django.core.management import CommandError 

2 

3from django_typer import TyperCommand 

4from django_typer.tests.utils import log_django_parameters 

5 

6 

7class Command(TyperCommand): 

8 help = "Test that django parameters work as expected" 

9 

10 def handle(self, throw: bool = False): 

11 assert self.__class__ == Command 

12 log_django_parameters(self) 

13 if throw: 13 ↛ 14line 13 didn't jump to line 14, because the condition on line 13 was never true

14 raise CommandError("Test Exception")