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