From 7f3db2f82ce70886abfc542325c097f3edf7ff27 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:37:12 +0900 Subject: [PATCH] =?UTF-8?q?test=5Fclient.py=E3=82=92=E6=94=B9=E5=96=84:=20?= =?UTF-8?q?/set/data/=20=E3=81=AE=E3=83=A2=E3=83=87=E3=83=AB/=E8=AA=8D?= =?UTF-8?q?=E8=A8=BC=E3=82=AD=E3=83=BC/URL=E7=B3=BB=E3=82=A8=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88(plamo,gemini,open?= =?UTF-8?q?ai,lmstudio,ollama)=E3=81=A7=20expected=20=E3=81=AB=20[200,400]?= =?UTF-8?q?=20=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=81=8C=20None=20=E3=81=AE=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=AE=E3=82=B9=E3=82=AD=E3=83=83=E3=83=97=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E3=82=92=E8=A6=8B=E7=9B=B4=E3=81=97=E3=80=81expected=20?= =?UTF-8?q?=E3=81=AB=20400=20=E3=81=8C=E5=90=AB=E3=81=BE=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=AF=E3=83=87=E3=83=BC=E3=82=BF=E7=84=A1?= =?UTF-8?q?=E3=81=97=E3=81=A7=E3=82=82=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E9=80=81=E4=BF=A1=E3=81=97=E3=81=A6=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/test_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src-python/test_client.py b/src-python/test_client.py index 6dd565d2..ef34f3ff 100644 --- a/src-python/test_client.py +++ b/src-python/test_client.py @@ -540,6 +540,7 @@ class AutomatedEndpointTester: lst = self._get("/get/data/plamo_model_list") or [] import random data = random.choice(lst) if lst else None + expected = [200,400] elif endpoint == "/set/data/plamo_auth_key": data = "PLAMO_DUMMY_KEY" expected = [200,400] @@ -547,6 +548,7 @@ class AutomatedEndpointTester: lst = self._get("/get/data/gemini_model_list") or [] import random data = random.choice(lst) if lst else None + expected = [200,400] elif endpoint == "/set/data/gemini_auth_key": data = "GEMINI_DUMMY_KEY" expected = [200,400] @@ -554,6 +556,7 @@ class AutomatedEndpointTester: lst = self._get("/get/data/openai_model_list") or [] import random data = random.choice(lst) if lst else None + expected = [200,400] elif endpoint == "/set/data/openai_auth_key": data = "OPENAI_DUMMY_KEY" expected = [200,400] @@ -561,6 +564,7 @@ class AutomatedEndpointTester: lst = self._get("/get/data/lmstudio_model_list") or [] import random data = random.choice(lst) if lst else None + expected = [200,400] elif endpoint == "/set/data/lmstudio_url": import random data = random.choice(["http://localhost:1234/v1","http://127.0.0.1:1234/v1","http://invalid_host:9999/v1"]) @@ -569,6 +573,7 @@ class AutomatedEndpointTester: lst = self._get("/get/data/ollama_model_list") or [] import random data = random.choice(lst) if lst else None + expected = [200,400] elif endpoint == "/set/data/deepl_auth_key": data = "DEEPL_DUMMY_KEY" expected=[200,400] @@ -745,7 +750,8 @@ class AutomatedEndpointTester: self._record(endpoint, None, None, expected) print(f"[SetData] {endpoint} -> {Color.RED}UNKNOWN{Color.RESET}") return False - if data is None: + # data が None でも expected に 400 が含まれていれば送信してテスト + if data is None and 400 not in expected: self._record(endpoint, None, None, expected) print(f"[SetData] {endpoint} -> {Color.YELLOW}SKIP(no data){Color.RESET}") return True