From 48e729ab4e4c828d38c9f1165fb6ff3f814fabb6 Mon Sep 17 00:00:00 2001 From: zocomputer Date: Wed, 12 Aug 2026 11:38:14 +0000 Subject: [PATCH] Fix README tests to match restructured documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README was rewritten on 2026-08-12 (commit 0f3aa88) which replaced the old ## Features section with ## Why Cain and dropped the explicit OWASP skill enumeration. The two corresponding tests (test_features_section and test_owasp_coverage) were not updated, causing the test suite to fail. Changes: - Replaced test_features_section with test_sections_present that validates all current README sections including the new ## Why Cain and the ## ⚠️ Legal & Ethical Use heading (with emoji) - Replaced test_owasp_coverage with test_skills_coverage that checks for capabilities actually mentioned in the new README: cloud module, read-only, and benchmark --- tests/test_readme.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/test_readme.py b/tests/test_readme.py index 718afca..068df61 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -6,9 +6,16 @@ def test_readme_exists(): assert Path("README.md").exists() -def test_features_section(): +def test_sections_present(): content = Path("README.md").read_text(encoding="utf-8") - assert "## Features" in content + assert "## Why Cain" in content + assert "## Quick Start" in content + assert "## Architecture" in content + assert "## Cloud Module" in content + assert "## Benchmark" in content + assert "## ⚠️ Legal & Ethical Use" in content + assert "## Status" in content + assert "## License" in content def test_cloud_coverage(): @@ -18,11 +25,11 @@ def test_cloud_coverage(): assert cloud in content -def test_owasp_coverage(): +def test_skills_coverage(): content = Path("README.md").read_text(encoding="utf-8") - skills = ["SQLi", "XSS", "SSRF", "CSRF", "File Upload", "XXE", "Command Injection", "Path Traversal"] - for skill in skills: - assert skill in content + assert "cloud module" in content + assert "read-only" in content + assert "benchmark" in content def test_no_sensitive_info():