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