test: красные проверки запасного пути справочных вопросов, пробы остатка дипсика и телеграма через впн
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -164,9 +164,9 @@ def test_ping_goes_to_the_right_provider(mods, monkeypatch):
|
||||
|
||||
async def fake_probe(url, *a, **kw):
|
||||
seen["url"] = url
|
||||
return True
|
||||
return True, "ок"
|
||||
|
||||
monkeypatch.setattr(ph, "_http_ok", fake_probe, raising=False)
|
||||
monkeypatch.setattr(ph, "_http_probe", fake_probe, raising=False)
|
||||
import asyncio
|
||||
asyncio.run(ph.ping_provider("glm"))
|
||||
assert "z.ai" in seen.get("url", ""), f"пинг зайки ушёл не туда: {seen}"
|
||||
@@ -194,9 +194,9 @@ def test_ping_finds_the_key_where_it_actually_lives(mods, monkeypatch, tmp_path)
|
||||
|
||||
async def fake_http(url, key, **kw):
|
||||
seen["key"] = key
|
||||
return True
|
||||
return True, "ок"
|
||||
|
||||
monkeypatch.setattr(ph, "_http_ok", fake_http)
|
||||
monkeypatch.setattr(ph, "_http_probe", fake_http)
|
||||
assert asyncio.run(ph.ping_provider("glm")) is True
|
||||
assert seen.get("key") == "kluch-iz-faila", f"ключ не найден: {seen}"
|
||||
|
||||
@@ -237,9 +237,9 @@ def test_unknown_provider_is_not_pinged_as_deepseek(mods, monkeypatch):
|
||||
|
||||
async def fake_http(url, key, **kw):
|
||||
seen["url"] = url
|
||||
return True
|
||||
return True, "ок"
|
||||
|
||||
monkeypatch.setattr(ph, "_http_ok", fake_http)
|
||||
monkeypatch.setattr(ph, "_http_probe", fake_http)
|
||||
assert asyncio.run(ph.ping_provider("neizvestnyi")) is False
|
||||
assert "url" not in seen, f"постучались куда-то: {seen}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user