fix: restore polished account experience and align AI with Lark design
This commit is contained in:
@@ -83,13 +83,57 @@ def create_test_app():
|
||||
path = request.url.path
|
||||
if path == "/authentication" and request.method == "POST":
|
||||
return httpx.Response(
|
||||
201, json={"user": {"id": "TEST_USER"}}, headers={"Set-Cookie": "mock=only; Path=/"}
|
||||
201,
|
||||
json={
|
||||
"user": {"id": "TEST_USER"},
|
||||
"token": {"expiry": 14400},
|
||||
"permissions": [
|
||||
"CONSULTANT",
|
||||
"SUPER_ALPHA",
|
||||
"MULTI_SIMULATION",
|
||||
"PROD_ALPHAS",
|
||||
"BRAIN_LABS",
|
||||
"BRAIN_LABS_JUPYTER_LAB",
|
||||
"REFERRAL",
|
||||
"VISUALIZATION",
|
||||
"WORKDAY",
|
||||
"BEFORE_AND_AFTER_PERFORMANCE_V2",
|
||||
],
|
||||
},
|
||||
headers={"Set-Cookie": "mock=only; Path=/"},
|
||||
)
|
||||
if request.method != "GET":
|
||||
raise AssertionError("Browser acceptance attempted an upstream mutation")
|
||||
if path == "/users/self":
|
||||
return httpx.Response(
|
||||
200, json={"id": "TEST_USER", "name": "模拟研究员", "email": "test@example.com"}
|
||||
200,
|
||||
json={
|
||||
"id": "TEST_USER",
|
||||
"fullName": "模拟研究员",
|
||||
"email": "test@example.com",
|
||||
"level": "CONSULTANT",
|
||||
"geniusLevel": "GOLD",
|
||||
"verified": True,
|
||||
"approved": True,
|
||||
"dateCreated": "2025-01-01T00:00:00Z",
|
||||
},
|
||||
)
|
||||
if path == "/users/self/alphas/summary":
|
||||
return httpx.Response(200, json={"unsubmitted": 413, "active": 207, "decommissioned": 0})
|
||||
if path in ("/users/self/activities/simulations", "/users/self/activities/submissions"):
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
today = datetime.now(ZoneInfo("America/New_York")).date()
|
||||
return httpx.Response(
|
||||
200,
|
||||
json={
|
||||
"yesterday": {"end": (today - timedelta(days=1)).isoformat(), "value": 2},
|
||||
"total": {"value": 207},
|
||||
"records": {
|
||||
"schema": {"properties": [{"name": "date"}, {"name": "value"}]},
|
||||
"records": [[today.isoformat(), 3]],
|
||||
},
|
||||
},
|
||||
)
|
||||
if path == "/users/self/alphas":
|
||||
unsubmitted = "status" in request.url.params
|
||||
|
||||
Reference in New Issue
Block a user