Tests: hand-built session mocks carry the observer flag

Browser probes that fake the session body must match the v2 session
schema, which now has the observer field (phase 12).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
db9979andClaude Fable 5.1 committed 2026-09-27 05:49:07 +02:00
1 parent 1fe8f21182
commit e2efa060f9
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -1018,7 +1018,7 @@ def test_direct_fire_grants_confirmation_exact_bodies_and_role_switch_in_chromiu
direct_fire=station in {"opz", "helicopter"})
session = dict(protocol=2, client_id="fire-client", name="Fire Watch",
csrf="fire-csrf", ordinal=0, presence=1.0, host=None,
next_command_seq=0, station="weapons", requested_station=None,
next_command_seq=0, observer=False, station="weapons", requested_station=None,
station_generation=1, active_station="weapons",
active_generation=1, simlog=False, stations=stations,
grants=dict(command=True, direct_fire=False, simlog=False,
@@ -1323,7 +1323,7 @@ def test_v2_lobby_requests_grants_release_reload_and_role_loss_in_real_chromium(
if self.path == "/api/v2/pair" and body == {"code": "123ABC", "name": "Lobby Watch"}:
cls.session = {"protocol": 2, "client_id": "client-1", "name": "Lobby Watch",
"csrf": "csrf-1", "ordinal": 0, "presence": 1.0,
"next_command_seq": 0, "active_station": None,
"next_command_seq": 0, "observer": False, "active_station": None,
"active_generation": 0, "simlog": False, "host": None,
"station": None, "requested_station": None,
"station_generation": 0,
+1 -1
View File
@@ -315,7 +315,7 @@ def test_v2_lobby_layout_is_bounded(tmp_path, width, height, zoom, language):
empty_grants = {"command": False, "direct_fire": False, "sonar_audio": False}
session = {"protocol": 2, "client_id": "layout-client", "name": "Layout Lobby",
"csrf": "layout-csrf", "ordinal": 0, "presence": 1.0,
"next_command_seq": 0, "active_station": None,
"next_command_seq": 0, "observer": False, "active_station": None,
"active_generation": 0, "simlog": False, "host": None,
"station": None, "requested_station": None, "station_generation": 0,
"stations": {
+1 -1
View File
@@ -99,7 +99,7 @@ def test_web_simlog_shows_all_projected_values_and_a_map_in_chromium(tmp_path):
stations = {station: _station_record() for station in STATIONS}
stations["opz"] = _station_record("mine", station_generation=1, command=True)
session = dict(protocol=2, client_id="log-client", name="Log Watch",
csrf="log-csrf", ordinal=0, presence=1.0, next_command_seq=0, host=None,
csrf="log-csrf", ordinal=0, presence=1.0, next_command_seq=0, host=None, observer=False,
station="opz", requested_station=None, station_generation=1,
active_station="opz", active_generation=1, simlog=True,
stations=stations,