test(lobby): lock session detail ownership boundary
All checks were successful
CI / test-and-quality (pull_request) Successful in 3m55s
CI / test-and-quality (push) Successful in 3m57s

This commit is contained in:
2026-03-17 21:22:39 +00:00
parent 72bc5997ff
commit 2cd8d940f9

View File

@@ -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")