The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: trim purge-identity tests to behaviour invariants
teknium1ba8b458c5bc4
diff --git a/tests/gateway/test_profile_identity_purge.py b/tests/gateway/test_profile_identity_purge.pyindex 5acb6c99557..fff1e296deb 100644--- a/tests/gateway/test_profile_identity_purge.py+++ b/tests/gateway/test_profile_identity_purge.py@@ -121,11 +121,3 @@ def test_purge_verb_drops_routing_identity_and_reports_ok(tmp_path):"SELECT COUNT(*) AS n FROM gateway_heartbeats WHERE profile = ?", ("gone",))["n"] == 0finally:db.close()---def test_purge_verb_refuses_without_a_name_or_store():- """A malformed request or a gateway with no store answers failure — never a silent success."""- from gateway.run_profile_reconcile import purge_profile_identity_verb- no_store = purge_profile_identity_verb(SimpleNamespace(session_store=None))- assert no_store({})["ok"] is False- assert no_store({"name": "gone"})["ok"] is Falsediff --git a/tests/hermes_cli/test_profile_identity_purge_cmd.py b/tests/hermes_cli/test_profile_identity_purge_cmd.pyindex ff7a3791e58..66a669d98d2 100644--- a/tests/hermes_cli/test_profile_identity_purge_cmd.py+++ b/tests/hermes_cli/test_profile_identity_purge_cmd.py@@ -53,12 +53,6 @@ def test_purge_identity_exits_nonzero_when_settlement_stays_pending(assert "hermes profile purge-identity gone" in capsys.readouterr().err-def test_purge_identity_rejects_the_default_profile(profile_env, capsys):- with pytest.raises(SystemExit):- profile_cmd.cmd_profile(Namespace(profile_action="purge-identity", profile_name="default"))- assert "named profiles only" in capsys.readouterr().out--def test_purge_identity_refuses_a_same_name_profile_created_after_the_delete(profile_env, capsys):"""The retry must not purge identity out from under a profile that exists again.diff --git a/tests/hermes_state/test_purge_profile_state.py b/tests/hermes_state/test_purge_profile_state.pyindex 2c4b1c2d573..dc3e2a9f981 100644--- a/tests/hermes_state/test_purge_profile_state.py+++ b/tests/hermes_state/test_purge_profile_state.py@@ -150,10 +150,3 @@ class TestPurgeProfileState:routing = db.load_gateway_routing_entries(scope="/root/sessions")assert "agent:foo_bar:feishu:dm:chatA" not in routingassert "agent:fooXbar:feishu:dm:chatB" in routing-- def test_purge_is_idempotent(self, db):- db.register_backend_heartbeat(- backend_id="be1", pid=1, started_at=time.time(), profile="gone", host="h")-- assert db.purge_profile_state("gone")["gateway_heartbeats"] == 1- assert db.purge_profile_state("gone")["gateway_heartbeats"] == 0