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

@@ -1110,7 +1110,7 @@ class TestVersionActionPermissions(DirectoriesMixin, APITestCase):
self.assertEqual(response.status_code, 403)
with (
mock.patch("documents.views.AIConfig") as ai_config,
mock.patch("documents.views.stream_chat_with_documents") as chat,
mock.patch("paperless_ai.chat.stream_chat_with_documents") as chat,
):
ai_config.return_value.ai_enabled = True
response = self.client.post(