Update test according to new layout

Separate method making request from TestCase
and into separate TestMixins classes.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-09-30 09:35:52 -04:00
parent 9041f00caa
commit 390e552c1f
9 changed files with 294 additions and 271 deletions

View File

@@ -13,7 +13,8 @@ class IndexTestMixin(object):
self.test_index = Index.objects.create(label=TEST_INDEX_LABEL)
# Add our document type to the new index
self.test_index.document_types.add(self.test_document_type)
if hasattr(self, 'test_document_type'):
self.test_index.document_types.add(self.test_document_type)
# Rebuild indexes
if rebuild: