From 50ad42d3a84a107788f00226b6f888ed7221563b Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 8 Jun 2021 12:36:47 -0400 Subject: [PATCH] You have to mock out the protocol builder in tests that rely on it. --- tests/scripts/test_get_study_associate_validation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/scripts/test_get_study_associate_validation.py b/tests/scripts/test_get_study_associate_validation.py index 62a30124..73803c99 100644 --- a/tests/scripts/test_get_study_associate_validation.py +++ b/tests/scripts/test_get_study_associate_validation.py @@ -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')