去敏感提交

This commit is contained in:
2026-09-13 18:43:25 +08:00
parent 89021eb9f8
commit 599eea40d6
249 changed files with 16272 additions and 31659 deletions
+7 -7
View File
@@ -58,12 +58,12 @@ def test_state_idle_snapshot(webui):
def test_start_countdown_open_abort_cycle(webui):
referee, port = webui
status, body = call(port, "POST", "/ui/api/start",
{"module": "q3_practice", "robot_id": "2026001",
{"module": "q3_practice", "robot_id": "TEAM-0001",
"countdown_s": 0.05, "window_s": 5})
assert status == 200 and body["started"] is True
assert wait_until(lambda: referee.session.phase == "open")
status, state = call(port, "GET", "/ui/api/state")
assert state["phase"] == "open" and state["robot_id"] == "2026001"
assert state["phase"] == "open" and state["robot_id"] == "TEAM-0001"
assert "virtual_time_s" in state and "window_remaining_s" in state
status, body = call(port, "POST", "/ui/api/abort", {})
assert body["aborted"] is True
@@ -75,12 +75,12 @@ def test_start_countdown_open_abort_cycle(webui):
def test_start_rejects_running_session_and_bad_module(webui):
_referee, port = webui
call(port, "POST", "/ui/api/start",
{"module": "q3_practice", "robot_id": "2026001", "countdown_s": 5})
{"module": "q3_practice", "robot_id": "TEAM-0001", "countdown_s": 5})
status, _body = call(port, "POST", "/ui/api/start",
{"module": "q3_practice", "robot_id": "2026001"})
{"module": "q3_practice", "robot_id": "TEAM-0001"})
assert status == 409
status, _body = call(port, "POST", "/ui/api/start",
{"module": "nope", "robot_id": "2026001"})
{"module": "nope", "robot_id": "TEAM-0001"})
assert status == 409
call(port, "POST", "/ui/api/abort", {})
@@ -98,7 +98,7 @@ def test_config_endpoints(webui):
def test_sessions_list_and_replay_source(webui):
referee, port = webui
call(port, "POST", "/ui/api/start",
{"module": "q3_practice", "robot_id": "2026001",
{"module": "q3_practice", "robot_id": "TEAM-0001",
"countdown_s": 0.05, "window_s": 5, "seed": 11, "source_count": 10})
assert wait_until(lambda: referee.session.phase == "open")
session = referee.session
@@ -115,7 +115,7 @@ def test_sessions_list_and_replay_source(webui):
status, data = call(port, "GET", "/ui/api/sessions")
assert status == 200 and len(data["sessions"]) == 1
case = data["sessions"][0]["case_code"]
assert data["sessions"][0]["robot_id"] == "2026001"
assert data["sessions"][0]["robot_id"] == "TEAM-0001"
status, replay = call(port, "GET", f"/ui/api/replay?case={case}")
assert status == 200
kinds = [event["event"] for event in replay["events"]]