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