15 lines
436 B
Python
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
|