mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	fix some test cases
This commit is contained in:
		| @@ -146,6 +146,7 @@ class TestDocumentApi(DirectoriesMixin, APITestCase): | ||||
|         self.assertEqual(response.status_code, 200) | ||||
|         self.assertEqual(response.content, content_thumbnail) | ||||
|  | ||||
|     @override_settings(PAPERLESS_FILENAME_FORMAT="") | ||||
|     def test_download_with_archive(self): | ||||
|  | ||||
|         _, filename = tempfile.mkstemp(dir=self.dirs.originals_dir) | ||||
|   | ||||
| @@ -558,6 +558,7 @@ class TestFileHandlingWithArchive(DirectoriesMixin, TestCase): | ||||
|         self.assertTrue(os.path.isfile(doc.source_path)) | ||||
|         self.assertTrue(os.path.isfile(doc.archive_path)) | ||||
|  | ||||
|     @override_settings(PAPERLESS_FILENAME_FORMAT="") | ||||
|     def test_archive_deleted(self): | ||||
|         original = os.path.join(settings.ORIGINALS_DIR, "0000001.pdf") | ||||
|         archive = os.path.join(settings.ARCHIVE_DIR, "0000001.pdf") | ||||
|   | ||||
| @@ -106,6 +106,7 @@ class TestMakeIndex(TestCase): | ||||
|  | ||||
| class TestRenamer(DirectoriesMixin, TestCase): | ||||
|  | ||||
|     @override_settings(PAPERLESS_FILENAME_FORMAT="") | ||||
|     def test_rename(self): | ||||
|         doc = Document.objects.create(title="test", mime_type="application/pdf") | ||||
|         doc.filename = generate_filename(doc) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler