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