Chore: Import paperless_ai helpers lazily in views

This commit is contained in:
Trenton H committed 2026-10-30 10:22:02 -07:00
1 parent 943dc7af99
commit 984607ee42
8 files changed
+43 -39

No files matched your search

+2 -2
View File
@@ -61,7 +61,7 @@ class TestChatStreamingViewInputValidation(APITestCase):
return_value=self._mock_ai_enabled(),
),
mock.patch(
"documents.views.stream_chat_with_documents",
"paperless_ai.chat.stream_chat_with_documents",
return_value=iter(chunks),
),
):
@@ -104,7 +104,7 @@ class TestChatStreamingViewUnrestrictedFlag:
"""
mocker.patch("documents.views.AIConfig").return_value.ai_enabled = True
return mocker.patch(
"documents.views.stream_chat_with_documents",
"paperless_ai.chat.stream_chat_with_documents",
return_value=iter(()),
)