From 2cd8d940f98b39c7f6073b9c2662c94a7c581878 Mon Sep 17 00:00:00 2001 From: dev-bot Date: Tue, 17 Mar 2026 21:22:39 +0000 Subject: [PATCH] test(lobby): lock session detail ownership boundary --- lobby/tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lobby/tests.py b/lobby/tests.py index 84a0bc0..4c59953 100644 --- a/lobby/tests.py +++ b/lobby/tests.py @@ -99,6 +99,18 @@ class LobbyGameplayExtractionTests(TestCase): self.assertNotIn("build_finish_game_response", source) self.assertNotIn("build_finish_game_phase_event", source) + def test_session_detail_view_source_stays_http_thin(self): + source = inspect.getsource(inspect.unwrap(lobby_views.session_detail)) + + self.assertIn("session = _maybe_promote_reveal_to_scoreboard(session)", source) + self.assertIn("current_round_question = _get_current_round_question(session)", source) + self.assertIn("round_question_payload = _build_round_question_payload(current_round_question)", source) + self.assertIn("phase_view_model = _build_phase_view_model(", source) + self.assertNotIn("lies.select_related", source) + self.assertNotIn("guesses.select_related", source) + self.assertNotIn("Player.objects.filter(session=session)", source) + self.assertNotIn("leaderboard =", source) + @patch("lobby.views.sync_broadcast_phase_event") @patch("lobby.views._start_round")