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