Add remaining test files
This commit is contained in:
14
tests/test_validators/test_best_practices.py
Normal file
14
tests/test_validators/test_best_practices.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
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
|
||||||
Reference in New Issue
Block a user