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