You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
511 B

3 months ago
  1. """Tests for license."""
  2. import os
  3. def test_license_present():
  4. """Test that the MIT license is present in the header of each module file."""
  5. for path, _, files in os.walk("src/keycloak"):
  6. for _file in files:
  7. if _file.endswith(".py"):
  8. with open(os.path.join(path, _file), "r") as fp:
  9. content = fp.read()
  10. assert content.startswith(
  11. "# -*- coding: utf-8 -*-\n#\n# The MIT License (MIT)\n#\n#"
  12. )