Unify tests that use upload documents. Add explicit mode when opening a file.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-09-06 03:38:17 -04:00
parent 388b61ca7a
commit 4eab4670be
33 changed files with 245 additions and 423 deletions
@@ -30,7 +30,7 @@ class DocumentStateIndexingTestCase(BaseTestCase):
)
def _create_document(self):
with open(TEST_SMALL_DOCUMENT_PATH) as file_object:
with open(TEST_SMALL_DOCUMENT_PATH, 'rb') as file_object:
self.document = self.document_type.new_document(
file_object=file_object
)