Refactor file copy to use Path instead of os.path.join

This commit is contained in:
s0llvan 2024-09-24 16:38:17 +00:00
parent a9f6e054c1
commit a85d6cdc38

View File

@ -1,5 +1,6 @@
import os
import shutil
from pathlib import Path
from django.conf import settings
@ -26,7 +27,7 @@ class TestMigrateDocumentPagesCount(TestMigrations):
)
self.doc_id = doc.id
shutil.copy(
os.path.join(os.path.dirname(__file__), "samples", "simple.pdf"),
Path(__file__).parent / "samples" / "simple.pdf",
source_path_before(doc),
)