MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / TestDJANGO_DEBUG001

Class TestDJANGO_DEBUG001

tests/unit/test_missing_rules.py:347–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345# ============================================================
346
347class 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# ============================================================

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected