fix(openclaw): make ScrapeCreators key optional

This commit is contained in:
gujishh
2026-05-15 12:15:19 +09:00
committed by Trevin Chow
parent 2e39ee8ce4
commit 8af8f06b06
2 changed files with 15 additions and 2 deletions
+13
View File
@@ -64,6 +64,19 @@ class TestRunOpenclawSetup:
assert result["keys"]["brave"] is True
assert result["keys"]["scrapecreators"] is False
def test_openclaw_metadata_keeps_scrapecreators_optional(self):
"""OpenClaw metadata should not hard-require the ScrapeCreators key."""
skill_md = Path(__file__).parent.parent / "skills" / "last30days" / "SKILL.md"
text = skill_md.read_text()
assert "SCRAPECREATORS_API_KEY" in text
expected = (
"requires:\n"
" env: []\n"
" optionalEnv:\n"
" - SCRAPECREATORS_API_KEY"
)
assert expected in text
@patch("shutil.which")
def test_x_method_xai(self, mock_which):
"""x_method is 'xai' when XAI_API_KEY is set."""