Agent 2.0 exdev 서버 배포 스택
- server-dev start/stop/deploy 및 Gitea push 자동 배포 - local-dev 로컬 개발 환경 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
"""Functional tests for AgentPendingStore (in-memory path)."""
|
||||
|
||||
from agent.pending_store import AgentPendingStore
|
||||
|
||||
|
||||
def test_pending_save_get_clear_memory_fallback(monkeypatch):
|
||||
monkeypatch.setattr(AgentPendingStore, "_init_mongo", lambda self: None)
|
||||
|
||||
store = AgentPendingStore()
|
||||
store.save(
|
||||
"user-a",
|
||||
pending_intent_type="FARE_SEARCH",
|
||||
pending_params={"toIc": "신갈"},
|
||||
missing_params=["fromIc"],
|
||||
)
|
||||
|
||||
loaded = store.get("user-a")
|
||||
assert loaded is not None
|
||||
assert loaded["pendingIntentType"] == "FARE_SEARCH"
|
||||
assert loaded["pendingParams"]["toIc"] == "신갈"
|
||||
assert loaded["missingParams"] == ["fromIc"]
|
||||
|
||||
store.clear("user-a")
|
||||
assert store.get("user-a") is None
|
||||
|
||||
|
||||
def test_pending_normalizes_anonymous_bot_id(monkeypatch):
|
||||
monkeypatch.setattr(AgentPendingStore, "_init_mongo", lambda self: None)
|
||||
|
||||
store = AgentPendingStore()
|
||||
store.save(
|
||||
None,
|
||||
pending_intent_type="FARE_UNPAID",
|
||||
pending_params={},
|
||||
missing_params=["carNo"],
|
||||
)
|
||||
|
||||
loaded = store.get("")
|
||||
assert loaded is not None
|
||||
assert loaded["pendingIntentType"] == "FARE_UNPAID"
|
||||
Reference in New Issue
Block a user