diff options
Diffstat (limited to 'pyblackbird_cc/resources/tests/test_file_processing.py')
-rw-r--r-- | pyblackbird_cc/resources/tests/test_file_processing.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pyblackbird_cc/resources/tests/test_file_processing.py b/pyblackbird_cc/resources/tests/test_file_processing.py index e4ac781..7b95a9d 100644 --- a/pyblackbird_cc/resources/tests/test_file_processing.py +++ b/pyblackbird_cc/resources/tests/test_file_processing.py @@ -1,3 +1,6 @@ +from pathlib import Path + +from django.conf import settings from django.contrib.auth import get_user_model from django.core.files.uploadedfile import InMemoryUploadedFile from django.core.files.uploadedfile import SimpleUploadedFile @@ -5,9 +8,8 @@ from django.core.files.uploadedfile import TemporaryUploadedFile from django.test import TestCase from django.urls import reverse -from ..utils import _get_pdf_collection_type - from .. import services +from ..utils import _get_pdf_collection_type def test_detect_snapshotted_pdf_collection(): @@ -25,7 +27,9 @@ def test_detect_snapshotted_pdf_collection(): class PDFFileUploadTestCase(TestCase): def setUp(self): self.url = reverse("resources:create_resource") - self.test_file_path = "resources/tests/testdata/test_small_file.pdf" + self.test_file_path = Path( + settings.BASE_DIR / "pyblackbird_cc" / "resources/tests/testdata/test_small_file.pdf" + ) # Create a test user self.email = "testuser@example.com" |