mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-19 13:06:46 +01:00
Chore: switch from os.path to pathlib.Path (#10539)
This commit is contained in:
parent
cc621cf729
commit
d2064a2535
11 changed files with 151 additions and 165 deletions
|
|
@ -230,9 +230,9 @@ class TestExportImport(
|
|||
|
||||
for element in manifest:
|
||||
if element["model"] == "documents.document":
|
||||
fname = (
|
||||
self.target / element[document_exporter.EXPORTER_FILE_NAME]
|
||||
).as_posix()
|
||||
fname = str(
|
||||
self.target / element[document_exporter.EXPORTER_FILE_NAME],
|
||||
)
|
||||
self.assertIsFile(fname)
|
||||
self.assertIsFile(
|
||||
self.target / element[document_exporter.EXPORTER_THUMBNAIL_NAME],
|
||||
|
|
@ -462,9 +462,9 @@ class TestExportImport(
|
|||
|
||||
call_command(*args)
|
||||
|
||||
expected_file = (
|
||||
self.target / f"export-{timezone.localdate().isoformat()}.zip"
|
||||
).as_posix()
|
||||
expected_file = str(
|
||||
self.target / f"export-{timezone.localdate().isoformat()}.zip",
|
||||
)
|
||||
|
||||
self.assertIsFile(expected_file)
|
||||
|
||||
|
|
@ -498,9 +498,9 @@ class TestExportImport(
|
|||
):
|
||||
call_command(*args)
|
||||
|
||||
expected_file = (
|
||||
self.target / f"export-{timezone.localdate().isoformat()}.zip"
|
||||
).as_posix()
|
||||
expected_file = str(
|
||||
self.target / f"export-{timezone.localdate().isoformat()}.zip",
|
||||
)
|
||||
|
||||
self.assertIsFile(expected_file)
|
||||
|
||||
|
|
@ -544,9 +544,9 @@ class TestExportImport(
|
|||
|
||||
call_command(*args)
|
||||
|
||||
expected_file = (
|
||||
self.target / f"export-{timezone.localdate().isoformat()}.zip"
|
||||
).as_posix()
|
||||
expected_file = str(
|
||||
self.target / f"export-{timezone.localdate().isoformat()}.zip",
|
||||
)
|
||||
|
||||
self.assertIsFile(expected_file)
|
||||
self.assertIsNotFile(existing_file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue