fix test cases
This commit is contained in:
1 parent
05a43a05a4
commit
8e35e6c726
2 files changed
+3
-2
No files matched your search
@@ -26,7 +26,7 @@ class TestPdfCache(DirectoriesMixin, TestCase):
|
||||
|
||||
def test_open_no_pdf(self):
|
||||
doc = Document.objects.create(mime_type="image/jpeg")
|
||||
self.assertRaisesMessage(MergeError, "does not have PDF.", self.cache.open_from_document, doc)
|
||||
self.assertRaisesMessage(MergeError, "does not have a PDF.", self.cache.open_from_document, doc)
|
||||
|
||||
def test_open_original_pdf(self):
|
||||
doc = Document.objects.create(mime_type="application/pdf", filename="test.pdf")
|
||||
|
||||
@@ -675,6 +675,7 @@ class DocumentSplitMergeViewSet(GenericViewSet):
|
||||
tempdir=self.tempdir
|
||||
)
|
||||
except MergeError:
|
||||
raise
|
||||
logger.exception("Error during merge")
|
||||
return HttpResponseBadRequest()
|
||||
|
||||
return Response([os.path.basename(file) for file in pdf_files])
|
||||
Reference in new issue
Block a user