87abb1
From bb1c91432c5e9a1f402692db5c80c65136656afb Mon Sep 17 00:00:00 2001
87abb1
From: Jeremy Cline <jeremy@jcline.org>
87abb1
Date: Tue, 13 Jun 2017 09:08:09 -0400
87abb1
Subject: [PATCH] Remove tests that use the tarpit
87abb1
87abb1
The latest version of Mock has started using systemd containers. The
87abb1
systemd-nspawn command is being run with --private-network, which
87abb1
immediately kills connections to something other than localhost. These
87abb1
tests depend on the connection not being killed immediately and that
87abb1
they are never responded to.
87abb1
87abb1
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
87abb1
---
87abb1
 tests/test_requests.py | 25 -------------------------
87abb1
 1 file changed, 25 deletions(-)
87abb1
87abb1
diff --git a/tests/test_requests.py b/tests/test_requests.py
87abb1
index 7d4a4eb5..8d1c55fc 100644
87abb1
--- a/tests/test_requests.py
87abb1
+++ b/tests/test_requests.py
87abb1
@@ -2186,31 +2186,6 @@ class TestTimeout:
87abb1
         except ReadTimeout:
87abb1
             pass
87abb1
 
87abb1
-    @pytest.mark.parametrize(
87abb1
-        'timeout', (
87abb1
-            (0.1, None),
87abb1
-            Urllib3Timeout(connect=0.1, read=None)
87abb1
-        ))
87abb1
-    def test_connect_timeout(self, timeout):
87abb1
-        try:
87abb1
-            requests.get(TARPIT, timeout=timeout)
87abb1
-            pytest.fail('The connect() request should time out.')
87abb1
-        except ConnectTimeout as e:
87abb1
-            assert isinstance(e, ConnectionError)
87abb1
-            assert isinstance(e, Timeout)
87abb1
-
87abb1
-    @pytest.mark.parametrize(
87abb1
-        'timeout', (
87abb1
-            (0.1, 0.1),
87abb1
-            Urllib3Timeout(connect=0.1, read=0.1)
87abb1
-        ))
87abb1
-    def test_total_timeout_connect(self, timeout):
87abb1
-        try:
87abb1
-            requests.get(TARPIT, timeout=timeout)
87abb1
-            pytest.fail('The connect() request should time out.')
87abb1
-        except ConnectTimeout:
87abb1
-            pass
87abb1
-
87abb1
     def test_encoded_methods(self, httpbin):
87abb1
         """See: https://github.com/psf/requests/issues/2316"""
87abb1
         r = requests.request(b'GET', httpbin('get'))
87abb1
-- 
87abb1
2.24.1
87abb1