From a9c6e4fd7936099b791357200f082d9b2326a3cb Mon Sep 17 00:00:00 2001 From: dev-bot Date: Tue, 17 Mar 2026 17:25:22 +0000 Subject: [PATCH] test(lobby): lock host transition ownership boundary --- lobby/tests.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lobby/tests.py b/lobby/tests.py index 8846217..bc67d98 100644 --- a/lobby/tests.py +++ b/lobby/tests.py @@ -1,3 +1,4 @@ +import inspect import json import tempfile from datetime import timedelta @@ -60,6 +61,24 @@ class LobbyGameplayExtractionTests(TestCase): self.assertIs(lobby_views._finish_game, gameplay_services.finish_game) self.assertIs(lobby_views._build_scoreboard_phase_event, gameplay_payloads.build_scoreboard_phase_event) + def test_start_next_round_view_source_stays_http_thin(self): + source = inspect.getsource(inspect.unwrap(lobby_views.start_next_round)) + + self.assertIn("transition = _start_next_round(session)", source) + self.assertNotIn("RoundConfig", source) + self.assertNotIn("RoundQuestion", source) + self.assertNotIn("build_start_next_round_response", source) + self.assertNotIn("build_start_next_round_phase_event", source) + + def test_finish_game_view_source_stays_http_thin(self): + source = inspect.getsource(inspect.unwrap(lobby_views.finish_game)) + + self.assertIn("transition = _finish_game(session)", source) + self.assertNotIn("RoundConfig", source) + self.assertNotIn("RoundQuestion", source) + self.assertNotIn("build_finish_game_response", source) + self.assertNotIn("build_finish_game_phase_event", source) + @patch("lobby.views.sync_broadcast_phase_event") @patch("lobby.views._start_next_round") def test_start_next_round_view_delegates_transition_to_service(