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