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