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
|
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
|