Some checks failed
Test / pytest (pull_request) Failing after 8s
Add automated script that detects security updates, creates a branch, updates requirements.txt, runs tests, and opens a PR via Gitea API. Acceptance: - Detects security update (via `pip list --outdated`) - Creates branch (step35/security/patch-<pkg>-<ver>) - Updates dependency (requirements.txt) - Runs tests (pytest) - Opens PR (Gitea API, Closes #113) Resolves: #113 Task: 5.7 — Security Patch Applier
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")
|