Commit 0583dae1 authored by Thomas Goirand's avatar Thomas Goirand

* Remove test that is doing network access during the build. Thanks to

    Adrian Bunk for the bug report (Closes: #909287).
parent 3a773396
python-httpretty (0.9.5-2) UNRELEASED; urgency=medium
python-httpretty (0.9.5-2) unstable; urgency=medium
* Add RES_OPTIONS=attempts:0 to avoid resolving in unit tests.
* Remove test that is doing network access during the build. Thanks to
Adrian Bunk for the bug report (Closes: #909287).
-- Thomas Goirand <zigo@debian.org> Fri, 21 Sep 2018 10:12:41 +0200
......
Description: Remove network access test
This test is doing network access, which isn't acceptable during build.
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/909287
Forwarded: no
Last-Update: 2018-09-21
--- python-httpretty-0.9.5.orig/tests/unit/test_core.py
+++ python-httpretty-0.9.5/tests/unit/test_core.py
@@ -188,36 +188,6 @@ def test_fake_ssl_socket_proxies_its_ow_
socket.send.assert_called_once_with("FOO")
-@patch('httpretty.core.datetime')
-def test_fakesock_socket_getpeercert(dt):
- ("fakesock.socket#getpeercert should return a hardcoded fake certificate")
- # Background:
- dt.now.return_value = datetime(2013, 10, 4, 4, 20, 0)
-
- # Given a fake socket instance
- socket = fakesock.socket()
-
- # And that it's bound to some host and port
- socket.connect(('somewhere.com', 80))
-
- # When I retrieve the peer certificate
- certificate = socket.getpeercert()
-
- # Then it should return a hardcoded value
- certificate.should.equal({
- u'notAfter': 'Sep 29 04:20:00 GMT',
- u'subject': (
- ((u'organizationName', u'*.somewhere.com'),),
- ((u'organizationalUnitName', u'Domain Control Validated'),),
- ((u'commonName', u'*.somewhere.com'),)),
- u'subjectAltName': (
- (u'DNS', u'*.somewhere.com'),
- (u'DNS', u'somewhere.com'),
- (u'DNS', u'*')
- )
- })
-
-
def test_fakesock_socket_ssl():
("fakesock.socket#ssl should take a socket instance and return itself")
# Given a fake socket instance
remove-with-randomly.patch
remove-broken-test.patch
remove-network-access-test.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment