Update document parsing app tests to work with Python 3.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-10-06 05:02:53 -04:00
parent 36e4d78487
commit 28706f5ea5
2 changed files with 3 additions and 3 deletions

View File

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