merge: integrate ZSY customer service and profile capabilities
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.main import create_app
|
||||
|
||||
|
||||
def test_customer_service_test_page_exposes_visitor_agent_flow() -> None:
|
||||
with TestClient(create_app()) as client:
|
||||
response = client.get("/customer-service-test/")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "奶龙基金智能助手" in response.text
|
||||
assert "/api/v1/visitor-tokens" in response.text
|
||||
assert "/api/v1/agent-runs" in response.text
|
||||
@@ -0,0 +1,14 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.main import create_app
|
||||
|
||||
|
||||
def test_visitor_token_endpoint_returns_short_lived_bearer_token() -> None:
|
||||
with TestClient(create_app()) as client:
|
||||
response = client.post("/api/v1/visitor-tokens")
|
||||
|
||||
assert response.status_code == 201
|
||||
body = response.json()
|
||||
assert isinstance(body["access_token"], str)
|
||||
assert body["token_type"] == "Bearer"
|
||||
assert body["expires_in"] == 900
|
||||
Reference in New Issue
Block a user