From a4a12b0cfe9e47d181ec5b47145b438ac2b29130 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 9 Oct 2019 21:09:36 -0400 Subject: [PATCH] Fix tests Signed-off-by: Roberto Rosario --- mayan/apps/ocr/tests/test_api.py | 2 +- mayan/apps/ocr/tests/test_models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mayan/apps/ocr/tests/test_api.py b/mayan/apps/ocr/tests/test_api.py index 7534594ce4..578e8a94b8 100644 --- a/mayan/apps/ocr/tests/test_api.py +++ b/mayan/apps/ocr/tests/test_api.py @@ -57,7 +57,7 @@ class OCRAPIViewTestCase( self.assertTrue( hasattr( - self.test_document.pages.first().content_type, 'ocr_content' + self.test_document.pages.first().content_object, 'ocr_content' ) ) diff --git a/mayan/apps/ocr/tests/test_models.py b/mayan/apps/ocr/tests/test_models.py index 9bff1738a2..fe31995990 100644 --- a/mayan/apps/ocr/tests/test_models.py +++ b/mayan/apps/ocr/tests/test_models.py @@ -19,7 +19,7 @@ class DocumentOCRTestCase(DocumentTestMixin, BaseTestCase): _skip_file_descriptor_test = True def test_ocr_language_backends_end(self): - content = self.test_document.pages.first().get_ocr_content() + content = self.test_document.pages.first().content_object.ocr_content.content self.assertTrue(TEST_DOCUMENT_CONTENT in content) @@ -40,7 +40,7 @@ class GermanOCRSupportTestCase(DocumentTestMixin, BaseTestCase): ) def test_ocr_language_backends_end(self): - content = self.test_document.pages.first().ocr_content.content + content = self.test_document.pages.first().content_object.ocr_content.content self.assertTrue( TEST_DOCUMENT_CONTENT_DEU_1 in content