22 lines
615 B
Python
22 lines
615 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Smoke test for security_patch_applier — verifies module imports and argument parsing."""
|
||
|
|
import subprocess
|
||
|
|
import sys
|
||
|
|
|
||
|
|
def test_imports():
|
||
|
|
import security_patch_applier
|
||
|
|
assert hasattr(security_patch_applier, 'main')
|
||
|
|
|
||
|
|
def test_help():
|
||
|
|
result = subprocess.run(
|
||
|
|
[sys.executable, 'scripts/security_patch_applier.py', '--help'],
|
||
|
|
capture_output=True, text=True
|
||
|
|
)
|
||
|
|
assert result.returncode == 0
|
||
|
|
assert 'Security Patch Applier' in result.stdout or '--dry-run' in result.stdout
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
test_imports()
|
||
|
|
test_help()
|
||
|
|
print("OK")
|