14 lines
524 B
Python
14 lines
524 B
Python
from app.services.mitmproxy.templates import BUILTIN_TEMPLATES
|
|
|
|
|
|
def test_builtin_templates_use_four_space_indentation():
|
|
for template in BUILTIN_TEMPLATES:
|
|
for line in template.code.splitlines():
|
|
assert "\t" not in line, f"{template.id} contains a tab: {line!r}"
|
|
if not line.strip():
|
|
continue
|
|
indent = len(line) - len(line.lstrip(" "))
|
|
assert indent % 4 == 0, (
|
|
f"{template.id} has non-4-space indentation: {line!r}"
|
|
)
|