def test_set_physician_error_timeout(mocker, prescription): mocker.patch.object(Session, 'get', side_effect=Timeout) metric = Metric(prescription) physician = metric._set_physician() assert physician.get('error') is True
def test_set_physician_error_not_found(mocker, prescription, not_found_response): mocker.patch.object(Session, 'get', return_value=not_found_response) metric = Metric(prescription) physician = metric._set_physician() assert physician.get('error') is True