| 345 | # ============================================================ |
| 346 | |
| 347 | class TestDJANGO_DEBUG001: |
| 348 | def test_debug_true_fires(self): |
| 349 | code = "DEBUG = True" |
| 350 | assert fires(code, "DJANGO_DEBUG001"), "DJANGO_DEBUG001 must fire: DEBUG=True" |
| 351 | |
| 352 | def test_debug_false_safe(self): |
| 353 | code = "DEBUG = False" |
| 354 | assert not_fires(code, "DJANGO_DEBUG001"), "DJANGO_DEBUG001 must NOT fire for DEBUG=False" |
| 355 | |
| 356 | def test_debug_env_var_safe(self): |
| 357 | code = "DEBUG = os.environ.get('DEBUG', 'False') == 'True'" |
| 358 | assert not_fires(code, "DJANGO_DEBUG001"), "DJANGO_DEBUG001 must NOT fire for env var pattern" |
| 359 | |
| 360 | |
| 361 | # ============================================================ |
nothing calls this directly
no outgoing calls
no test coverage detected