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()) )