diff --git a/tests/test_uniform_federation.py b/tests/test_uniform_federation.py index fa9f2cf..ebc1a6b 100644 --- a/tests/test_uniform_federation.py +++ b/tests/test_uniform_federation.py @@ -360,72 +360,6 @@ def test_valid_asyncRequests_two_servers_post(mock_requests, client, two_servers assert Success == [200, 200] -@patch('federation.requests.post', side_effect=exceptions.ConnectionError) -def test_invalid_asyncRequests_two_servers_get(mock_requests, client, two_servers): - with client: - FR = get_federation_response("POST") - resp = FR.async_requests(request='GET', - endpoint_path=TestParams["path"], - endpoint_payload="", - header=TestParams["Headers"], - endpoint_service=TestParams["service"]) - ConnErrs = list(map(lambda a: a["response"] is None, resp.values())) - - # Error should just be propagated through since handle_server_request will address it - - assert len(resp) == 2 - assert ConnErrs == [True, True] - - -@patch('federation.requests.post', side_effect=exceptions.ConnectionError) -def test_invalid_asyncRequests_two_servers_post(mock_requests, client, two_servers): - with client: - FR = get_federation_response("POST") - resp = FR.async_requests(request='POST', - endpoint_path=TestParams["path"], - endpoint_payload="", - header=TestParams["Headers"], - endpoint_service=TestParams["service"]) - - Success = list(map(lambda a: "ConnectionError" in str(a), resp.values())) - - assert len(resp) == 2 - assert Success == [True, True] - - -@patch('federation.requests.post', side_effect=exceptions.Timeout) -def test_timeout_asyncRequests_two_servers_post(mock_requests, client, two_servers): - with client: - FR = get_federation_response("POST") - resp = FR.async_requests(request='POST', - endpoint_path=TestParams["path"], - endpoint_payload="", - header=TestParams["Headers"], - endpoint_service=TestParams["service"]) - - Success = list(map(lambda a: "Timeout" in str(a), resp.values())) - - assert len(resp) == 2 - assert Success == [True, True] - - -@patch('federation.requests.post', side_effect=exceptions.Timeout) -def test_timeout_asyncRequests_two_servers_get(mock_requests, client, two_servers): - with client: - FR = get_federation_response("GET") - resp = FR.async_requests(request='GET', - endpoint_path=TestParams["path"], - endpoint_payload="", - header=TestParams["Headers"], - endpoint_service=TestParams["service"]) - - TimeoutErrs = list(map(lambda a: "Timeout" in str(a), resp.values())) - - # Error should just be propagated through since handle_server_request will address it - - assert len(resp) == 2 - assert TimeoutErrs == [True, True] - # Test Federation with one server -------------------------------------------------------------------- @patch('federation.requests.Session.get', side_effect=mocked_service_get)