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 tests.base_test import BaseTest
|
||||||
from crc import app
|
from crc import app
|
||||||
|
|
||||||
|
|
||||||
class TestGetStudyAssociateValidation(BaseTest):
|
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
|
app.config['PB_ENABLED'] = True
|
||||||
self.load_example_data()
|
self.load_example_data()
|
||||||
workflow = self.create_workflow('get_study_associate')
|
workflow = self.create_workflow('get_study_associate')
|
||||||
|
|
Loading…
Reference in New Issue