Files
Greg BessoniandClaude Opus 4.6 ae47fcccba seo-agi: The GEO framework skill for Claude Code + OpenClaw
GEO framework that writes pages ranking on Google AND getting cited by
LLMs. 500-token chunk architecture, Reddit Test quality gates,
verification tags, Not For You blocks, information gain enforcement.

Data layer: DataForSEO, GSC, Ahrefs MCP, SEMRush MCP.
21 files, all tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 10:56:28 -04:00

51 lines
1.4 KiB
Python

"""Tests for env module."""
import sys
import os
import json
import tempfile
from pathlib import Path
sys.path.insert(
0, str(Path(__file__).parent.parent / "scripts")
)
from lib.env import load_config, _determine_mode, DEFAULT_CONFIG
def test_default_config():
config = DEFAULT_CONFIG.copy()
assert config["default_location"] == 2840
assert config["default_language"] == "en"
assert config["serp_depth"] == 10
assert config["save_research"] is True
def test_determine_mode_full():
creds = {"has_dataforseo": True, "has_gsc": True, "has_ahrefs": False, "has_semrush": False}
assert _determine_mode(creds) == "full"
def test_determine_mode_dataforseo_only():
creds = {"has_dataforseo": True, "has_gsc": False, "has_ahrefs": False, "has_semrush": False}
assert _determine_mode(creds) == "dataforseo-only"
def test_determine_mode_gsc_only():
creds = {"has_dataforseo": False, "has_gsc": True, "has_ahrefs": False, "has_semrush": False}
assert _determine_mode(creds) == "gsc-only"
def test_determine_mode_fallback():
creds = {"has_dataforseo": False, "has_gsc": False, "has_ahrefs": False, "has_semrush": False}
assert _determine_mode(creds) == "fallback"
if __name__ == "__main__":
test_default_config()
test_determine_mode_full()
test_determine_mode_dataforseo_only()
test_determine_mode_gsc_only()
test_determine_mode_fallback()
print("All tests passed.")