From 403f47b57c85352a27c63f9c327bb83a9618b139 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 10 Mar 2026 16:34:56 +0000 Subject: [PATCH] test(chat): use transaction case for async stream assertion --- backend/server/chat/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/server/chat/tests.py b/backend/server/chat/tests.py index c9c19305..b78e3852 100644 --- a/backend/server/chat/tests.py +++ b/backend/server/chat/tests.py @@ -3,7 +3,7 @@ from unittest.mock import patch from django.contrib.auth import get_user_model from django.test import TestCase -from rest_framework.test import APITestCase +from rest_framework.test import APITransactionTestCase from adventures.models import Collection, CollectionItineraryItem from chat.agent_tools import add_to_itinerary, get_trip_details @@ -165,7 +165,7 @@ class ChatViewSetToolValidationBoundaryTests(TestCase): ) -class ChatViewSetSearchPlacesClarificationTests(APITestCase): +class ChatViewSetSearchPlacesClarificationTests(APITransactionTestCase): @patch("chat.views.execute_tool") @patch("chat.views.stream_chat_completion") @patch("integrations.utils.auto_profile.update_auto_preference_profile")