Test simplification
Unify usage of self.test_document and self.test_documents in tests. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -13,14 +13,14 @@ class DocumentAutoParsingTestCase(GenericDocumentTestCase):
|
||||
|
||||
def test_disable_auto_parsing(self):
|
||||
self._create_document_type()
|
||||
self.test_document = self.upload_document()
|
||||
self.upload_document()
|
||||
with self.assertRaises(StopIteration):
|
||||
next(self.test_document.latest_version.content())
|
||||
|
||||
@override_settings(DOCUMENT_PARSING_AUTO_PARSING=True)
|
||||
def test_enabled_auto_parsing(self):
|
||||
self._create_document_type()
|
||||
self.test_document = self.upload_document()
|
||||
self.upload_document()
|
||||
self.assertTrue(
|
||||
TEST_DOCUMENT_CONTENT in next(self.test_document.content())
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user