From 28706f5ea5a8b8d2216fdb944345a7f2576df899 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 6 Oct 2018 05:02:53 -0400 Subject: [PATCH] Update document parsing app tests to work with Python 3. Signed-off-by: Roberto Rosario --- HISTORY.rst | 2 +- mayan/apps/document_parsing/tests/test_models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e0b47b086a..eee7472c43 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,7 +12,7 @@ YAML validation of arguments. * Add stricted error checking to the crop transformation. * Update compressed files class module to work with Python 3. - +* Update document parsing app tests to work with Python 3. 3.1.4 (2018-10-4) ================= diff --git a/mayan/apps/document_parsing/tests/test_models.py b/mayan/apps/document_parsing/tests/test_models.py index ad2693a2c6..906ba9c9c7 100644 --- a/mayan/apps/document_parsing/tests/test_models.py +++ b/mayan/apps/document_parsing/tests/test_models.py @@ -16,12 +16,12 @@ class DocumentAutoParsingTestCase(GenericDocumentTestCase): self._create_document_type() self.document = self.upload_document() with self.assertRaises(StopIteration): - self.document.latest_version.content().next() + next(self.document.latest_version.content()) @override_settings(DOCUMENT_PARSING_AUTO_PARSING=True) def test_enabled_auto_parsing(self): self._create_document_type() self.document = self.upload_document() self.assertTrue( - TEST_DOCUMENT_CONTENT in self.document.content().next() + TEST_DOCUMENT_CONTENT in next(self.document.content()) )