Browse Source

test: added a license test

pull/354/head
Richard Nemeth 2 years ago
parent
commit
17bfad5ec0
  1. 14
      tests/test_license.py

14
tests/test_license.py

@ -0,0 +1,14 @@
"""Tests for license."""
import os
def test_license_present():
"""Test that the MIT license is present in the header of each module file."""
for path, _, files in os.walk("src/keycloak"):
for _file in files:
if _file.endswith(".py"):
with open(os.path.join(path, _file), "r") as fp:
content = fp.read()
assert content.startswith(
"# -*- coding: utf-8 -*-\n#\n# The MIT License (MIT)\n#\n#"
)
Loading…
Cancel
Save