Files
shell-safe-validator/tests/test_validators/test_best_practices.py
2026-01-29 21:28:07 +00:00

15 lines
436 B
Python

import pytest
from src.validators import BestPracticesValidator
class TestBestPracticesValidator:
def setup_method(self):
self.validator = BestPracticesValidator()
def test_missing_shebang(self):
findings = self.validator.check("echo hello")
assert len(findings) >= 1
def test_has_shebang(self):
findings = self.validator.check("#!/bin/bash\necho hello")
assert len(findings) == 0