mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
Merge branch 'dev' into feature-permissions
This commit is contained in:
commit
0cfa5211e9
29 changed files with 923 additions and 482 deletions
|
|
@ -7,6 +7,7 @@ import tempfile
|
|||
import urllib.request
|
||||
import uuid
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
|
|
@ -812,7 +813,9 @@ class TestDocumentApi(DirectoriesMixin, APITestCase):
|
|||
m.assert_called_once()
|
||||
|
||||
args, kwargs = m.call_args
|
||||
self.assertEqual(kwargs["override_filename"], "simple.pdf")
|
||||
file_path = Path(args[0])
|
||||
self.assertEqual(file_path.name, "simple.pdf")
|
||||
self.assertIn(Path(settings.SCRATCH_DIR), file_path.parents)
|
||||
self.assertIsNone(kwargs["override_title"])
|
||||
self.assertIsNone(kwargs["override_correspondent_id"])
|
||||
self.assertIsNone(kwargs["override_document_type_id"])
|
||||
|
|
@ -837,7 +840,9 @@ class TestDocumentApi(DirectoriesMixin, APITestCase):
|
|||
m.assert_called_once()
|
||||
|
||||
args, kwargs = m.call_args
|
||||
self.assertEqual(kwargs["override_filename"], "simple.pdf")
|
||||
file_path = Path(args[0])
|
||||
self.assertEqual(file_path.name, "simple.pdf")
|
||||
self.assertIn(Path(settings.SCRATCH_DIR), file_path.parents)
|
||||
self.assertIsNone(kwargs["override_title"])
|
||||
self.assertIsNone(kwargs["override_correspondent_id"])
|
||||
self.assertIsNone(kwargs["override_document_type_id"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue