1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Description: Remove network-accessing tests
The package is, during its unit tests, trying to connect to google using both
http and https. This patch simply removes these tests.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: not-needed
Last-Update: 2015-01-25
--- python-wsgi-intercept-1.1.0.orig/test/test_http_client.py
+++ python-wsgi-intercept-1.1.0/test/test_http_client.py
@@ -62,20 +62,3 @@ def test_app_error():
http_client.getresponse().read()
http_client.close()
-
-def test_http_not_intercepted():
- with InstalledApp(wsgi_app.raises_app, host=HOST, port=80):
- http_client = http_lib.HTTPConnection('google.com')
- http_client.request('GET', '/')
- response = http_client.getresponse()
- http_client.close()
- assert 200 <= int(response.status) < 400
-
-
-def test_https_not_intercepted():
- with InstalledApp(wsgi_app.raises_app, host=HOST, port=443):
- http_client = http_lib.HTTPSConnection('google.com')
- http_client.request('GET', '/')
- response = http_client.getresponse()
- http_client.close()
- assert 200 <= int(response.status) < 400
--- python-wsgi-intercept-1.1.0.orig/test/test_requests.py
+++ python-wsgi-intercept-1.1.0/test/test_requests.py
@@ -82,15 +82,3 @@ def test_app_error():
with InstalledApp(wsgi_app.raises_app, host=HOST, port=80):
with py.test.raises(WSGIAppError):
requests.get('http://some_hopefully_nonexistant_domain/')
-
-
-def test_http_not_intercepted():
- with InstalledApp(wsgi_app.raises_app, host=HOST, port=80):
- resp = requests.get("http://google.com")
- assert resp.status_code >= 200 and resp.status_code < 300
-
-
-def test_https_not_intercepted():
- with InstalledApp(wsgi_app.raises_app, host=HOST, port=80):
- resp = requests.get("https://google.com")
- assert resp.status_code >= 200 and resp.status_code < 300
--- python-wsgi-intercept-1.1.0.orig/test/test_urllib.py
+++ python-wsgi-intercept-1.1.0/test/test_urllib.py
@@ -65,14 +65,3 @@ def test_app_error():
with py.test.raises(WSGIAppError):
url_lib.urlopen('http://some_hopefully_nonexistant_domain/')
-
-def test_http_not_intercepted():
- with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
- response = url_lib.urlopen('http://google.com/')
- assert 200 <= int(response.code) < 400
-
-
-def test_https_not_intercepted():
- with InstalledApp(wsgi_app.simple_app, host=HOST, port=443):
- response = url_lib.urlopen('https://google.com/')
- assert 200 <= int(response.code) < 400
|