This commit is contained in:
Your Name
2026-08-27 14:04:28 +08:00
parent f7720831be
commit 334890171e
3016 changed files with 263403 additions and 27971 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ class ManualAIIsolationTest(unittest.TestCase):
response = mock.Mock(status_code=200)
with (
mock.patch(
"ai_chat.requests.post",
"ai_chat._SESSION.post",
side_effect=[requests.exceptions.Timeout(), response],
) as post,
mock.patch("ai_chat.time.sleep"),
@@ -61,7 +61,7 @@ class ManualAIIsolationTest(unittest.TestCase):
def test_authentication_failure_is_not_retried(self) -> None:
response = mock.Mock(status_code=401)
with mock.patch("ai_chat.requests.post", return_value=response) as post:
with mock.patch("ai_chat._SESSION.post", return_value=response) as post:
result = _post_with_retry(
"https://example.invalid/v1/chat/completions",
purpose="测试模型",