diff --git a/tests/test_data_store_service.py b/tests/test_data_store_service.py index ce47c3df..0505b5a2 100644 --- a/tests/test_data_store_service.py +++ b/tests/test_data_store_service.py @@ -7,6 +7,9 @@ from crc.models.user import UserModel from crc.services.workflow_service import WorkflowService from flask import g +from uuid import UUID + +import hashlib import time @@ -14,10 +17,16 @@ class TestDataStoreValidation(BaseTest): @staticmethod def add_test_file(): + binary_data = b'1234' + md5_hash = UUID(hashlib.md5(binary_data).hexdigest()) file_model = DocumentModel( name='my_test_file', - type=FileType.pdf, - content_type='application/pdf' + type=FileType.pdf.value, + content_type='application/pdf', + irb_doc_code = 'Study_Protocol_Document', + data=binary_data, + md5_hash=md5_hash, + archived=False ) session.add(file_model) session.commit()