2c9580b
From 524cd22fb77e69db9bb3f017bbb1d9782c37b0cd 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
2c9580b
index b8350cb..46b7e9e 100755
2c9580b
--- a/tests/test_requests.py
2c9580b
+++ b/tests/test_requests.py
2c9580b
@@ -2049,31 +2049,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):
2c9580b
         """See: https://github.com/requests/requests/issues/2316"""
2c9580b
         r = requests.request(b'GET', httpbin('get'))
2c9580b
-- 
2c9580b
2.9.4
2c9580b