diff --git a/contrib/mayan_11_1.pdf.gpg b/contrib/sample_documents/mayan_11_1.pdf.gpg similarity index 100% rename from contrib/mayan_11_1.pdf.gpg rename to contrib/sample_documents/mayan_11_1.pdf.gpg diff --git a/contrib/mayan_11_1.pdf.sig b/contrib/sample_documents/mayan_11_1.pdf.sig similarity index 100% rename from contrib/mayan_11_1.pdf.sig rename to contrib/sample_documents/mayan_11_1.pdf.sig diff --git a/mayan/apps/document_signatures/tests.py b/mayan/apps/document_signatures/tests.py index 582ceb8f09..3fb8dc2024 100644 --- a/mayan/apps/document_signatures/tests.py +++ b/mayan/apps/document_signatures/tests.py @@ -24,7 +24,7 @@ class DocumentTestCase(unittest.TestCase): ) self.document.save() - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf')) new_version = self.document.new_version(file=File(file_object, name='mayan_11_1.pdf')) file_object.close() @@ -32,7 +32,7 @@ class DocumentTestCase(unittest.TestCase): self.failUnlessEqual(DocumentVersionSignature.objects.has_detached_signature(self.document), False) def test_new_document_version_signed(self): - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf.gpg')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf.gpg')) new_version_data = { 'comment': 'test comment 1', 'version_update': VERSION_UPDATE_MAJOR, @@ -51,14 +51,14 @@ class DocumentTestCase(unittest.TestCase): 'release_level': RELEASE_LEVEL_FINAL, 'serial': 0, } - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf')) new_version = self.document.new_version(file=File(file_object), **new_version_data) file_object.close() # GPGVerificationError self.failUnlessEqual(DocumentVersionSignature.objects.verify_signature(self.document), None) - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf.sig'), 'rb') + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf.sig'), 'rb') DocumentVersionSignature.objects.add_detached_signature(self.document, File(file_object)) file_object.close() diff --git a/mayan/apps/documents/tests.py b/mayan/apps/documents/tests.py index 89ce20e673..78956909ad 100644 --- a/mayan/apps/documents/tests.py +++ b/mayan/apps/documents/tests.py @@ -22,7 +22,7 @@ class DocumentTestCase(unittest.TestCase): self.document.save() # return File(file(self.filepath, 'rb'), name=self.filename) - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf')) new_version = self.document.new_version(file=File(file_object, name='mayan_11_1.pdf')) file_object.close() @@ -41,7 +41,7 @@ class DocumentTestCase(unittest.TestCase): self.failUnlessEqual(self.document.latest_version.get_formated_version(), '1.0') # self.failUnlessEqual(self.document.has_detached_signature(), False) - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf.gpg')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf.gpg')) new_version_data = { 'comment': 'test comment 1', 'version_update': VERSION_UPDATE_MAJOR, @@ -60,7 +60,7 @@ class DocumentTestCase(unittest.TestCase): 'release_level': RELEASE_LEVEL_FINAL, 'serial': 0, } - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf')) new_version = self.document.new_version(file=File(file_object), **new_version_data) file_object.close() @@ -83,7 +83,7 @@ class DocumentSearchTestCase(unittest.TestCase): ) self.document.save() - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf')) new_version = self.document.new_version(file=File(file_object, name='mayan_11_1.pdf')) file_object.close() # Text extraction on the first page only diff --git a/mayan/apps/folders/tests.py b/mayan/apps/folders/tests.py index 3288bfa8e8..0e743d4753 100644 --- a/mayan/apps/folders/tests.py +++ b/mayan/apps/folders/tests.py @@ -24,7 +24,7 @@ class FolderTestCase(unittest.TestCase): ) self.document.save() - file_object = open(os.path.join(settings.PROJECT_ROOT, 'contrib', 'mayan_11_1.pdf')) + file_object = open(os.path.join(settings.SITE_ROOT, 'contrib', 'sample_documents', 'mayan_11_1.pdf')) new_version = self.document.new_version(file=File(file_object, name='mayan_11_1.pdf')) file_object.close()