Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(avatar): 修复ut检测问题

xukange2db21a56a68
diff --git a/tests/unit_tests/agentserver/test_personal_context_websocket_api.py b/tests/unit_tests/agentserver/test_personal_context_websocket_api.py
index 4494f6641d..a30ee507d7 100644
--- a/tests/unit_tests/agentserver/test_personal_context_websocket_api.py
+++ b/tests/unit_tests/agentserver/test_personal_context_websocket_api.py
@@ -532,7 +532,7 @@ def test_agentserver_registers_canonical_personal_context_methods() -> None:
assert server_module._PERSONAL_CONTEXT_REQ_METHODS == {
item for item in ReqMethod if item.value.startswith("personal_context.")
}
- assert len(server_module._PERSONAL_CONTEXT_REQ_METHODS) == 27
+ assert len(server_module._PERSONAL_CONTEXT_REQ_METHODS) == 35
@pytest.mark.asyncio
diff --git a/tests/unit_tests/evolution/test_message.py b/tests/unit_tests/evolution/test_message.py
index 347f93154e..dee7c6ef14 100644
--- a/tests/unit_tests/evolution/test_message.py
+++ b/tests/unit_tests/evolution/test_message.py
@@ -62,8 +62,16 @@ class TestReqMethod:
"personal_context.context.get_source",
"personal_context.im_learning.get_status",
"personal_context.im_learning.run_now",
+ "personal_context.distill.get_config",
+ "personal_context.distill.get_status",
+ "personal_context.distill.patch_config",
+ "personal_context.distill.run_now",
+ "personal_context.profiles.list",
+ "personal_context.profiles.get_current",
+ "personal_context.profiles.get_version",
+ "personal_context.profiles.activate",
}
- assert len(methods) == 27
+ assert len(methods) == 35
@staticmethod
def test_session_methods():
diff --git a/tests/unit_tests/test_app_web_handlers.py b/tests/unit_tests/test_app_web_handlers.py
index 26a593c150..e36e0ce800 100644
--- a/tests/unit_tests/test_app_web_handlers.py
+++ b/tests/unit_tests/test_app_web_handlers.py
@@ -1340,6 +1340,14 @@ def test_web_forwards_only_canonical_personal_context_rpc_methods():
"personal_context.fetch.authorize_provider",
"personal_context.im_learning.get_status",
"personal_context.im_learning.run_now",
+ "personal_context.distill.get_config",
+ "personal_context.distill.get_status",
+ "personal_context.distill.patch_config",
+ "personal_context.distill.run_now",
+ "personal_context.profiles.list",
+ "personal_context.profiles.get_current",
+ "personal_context.profiles.get_version",
+ "personal_context.profiles.activate",
"personal_context.context.stream_graph",
"personal_context.context.stream_tree",
"personal_context.context.search_pages",
@@ -1359,7 +1367,7 @@ def test_web_forwards_only_canonical_personal_context_rpc_methods():
assert forwarded == methods
assert no_local == methods
- assert len(methods) == 27
+ assert len(methods) == 35
# =====================================================================
diff --git a/tests/unit_tests/test_personal_context_clean_cut.py b/tests/unit_tests/test_personal_context_clean_cut.py
index e243edaaf6..e634ea74bc 100644
--- a/tests/unit_tests/test_personal_context_clean_cut.py
+++ b/tests/unit_tests/test_personal_context_clean_cut.py
@@ -20,7 +20,7 @@ def test_personal_context_api_inventory_and_legacy_removal() -> None:
"personal_context.fetch.stop_" + "scheduler",
}
- assert len(methods) == 27
+ assert len(methods) == 35
assert methods.isdisjoint(removed_methods)
assert not any(item.value.startswith(legacy_prefix) for item in ReqMethod)