Skip to content

Commit acdd49f

Browse files
committed
threads testcases fix
1 parent 67b89c8 commit acdd49f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/app/tests/api/routes/test_threads.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
client = TestClient(app)
1515

1616

17-
@patch("src.app.api.v1.threads.OpenAI")
17+
@patch("app.api.routes.threads.OpenAI")
1818
def test_threads_endpoint(mock_openai):
1919
"""
2020
Test the /threads endpoint when creating a new thread.
@@ -53,7 +53,7 @@ def test_threads_endpoint(mock_openai):
5353
assert response_json["data"]["thread_id"] == "dummy_thread_id"
5454

5555

56-
@patch("src.app.api.v1.threads.OpenAI")
56+
@patch("app.api.routes.threads.OpenAI")
5757
@pytest.mark.parametrize(
5858
"remove_citation, expected_message",
5959
[
@@ -99,7 +99,7 @@ def test_process_run_variants(mock_openai, remove_citation, expected_message):
9999
mock_client.beta.threads.messages.list.return_value.data = [dummy_message]
100100

101101
# Patch send_callback and invoke process_run.
102-
with patch("src.app.api.v1.threads.send_callback") as mock_send_callback:
102+
with patch("app.api.routes.threads.send_callback") as mock_send_callback:
103103
process_run(request, mock_client)
104104
mock_send_callback.assert_called_once()
105105
callback_url, payload = mock_send_callback.call_args[0]

0 commit comments

Comments
 (0)