mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-31 03:55:43 +00:00
Chore: Import paperless_ai helpers lazily in views
This commit is contained in:
1 parent
943dc7af99
commit
984607ee42
8 files changed
+43
-39
No files matched your search
@@ -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(()),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user