Improve and fix failing metadata tests

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-29 20:43:33 -04:00
parent 23a4a56aae
commit 82651ff32c
14 changed files with 353 additions and 341 deletions
+3 -2
View File
@@ -24,12 +24,13 @@ class DocumentTestMixin(object):
label=TEST_DOCUMENT_TYPE_LABEL
)
def upload_document(self):
def upload_document(self, filename=None):
self._calculate_test_document_path()
with open(self.test_document_path, mode='rb') as file_object:
document = self.document_type.new_document(
file_object=file_object, label=self.test_document_filename
file_object=file_object,
label=filename or self.test_document_filename
)
return document