mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 13:18:35 +00:00
You have to mock out the protocol builder in tests that rely on it.
This commit is contained in:
parent
076d198fc6
commit
50ad42d3a8
@ -1,10 +1,16 @@
|
||||
import json
|
||||
from unittest.mock import patch
|
||||
|
||||
from tests.base_test import BaseTest
|
||||
from crc import app
|
||||
|
||||
|
||||
class TestGetStudyAssociateValidation(BaseTest):
|
||||
@patch('crc.services.protocol_builder.ProtocolBuilderService.get_investigators')
|
||||
def test_get_study_associate_validation(self, mock):
|
||||
response = self.protocol_builder_response('investigators.json')
|
||||
mock.return_value = json.loads(response)
|
||||
|
||||
def test_get_study_associate_validation(self):
|
||||
app.config['PB_ENABLED'] = True
|
||||
self.load_example_data()
|
||||
workflow = self.create_workflow('get_study_associate')
|
||||
|
Loading…
x
Reference in New Issue
Block a user