diff -Nru python-halberd-0.2.4/debian/changelog python-halberd-0.2.4/debian/changelog --- python-halberd-0.2.4/debian/changelog 2015-08-07 16:32:00.000000000 +0000 +++ python-halberd-0.2.4/debian/changelog 2015-11-22 21:29:12.000000000 +0000 @@ -1,3 +1,11 @@ +python-halberd (0.2.4-2) unstable; urgency=medium + + * Disable testsuite requiring internet connection + (Closes: #805781). + - thanks Chris Lamb for the useful bug report! + + -- Gianfranco Costamagna Sun, 22 Nov 2015 22:28:27 +0100 + python-halberd (0.2.4-1) unstable; urgency=low * Initial release (Closes: #593015) diff -Nru python-halberd-0.2.4/debian/patches/disable-external-tests.patch python-halberd-0.2.4/debian/patches/disable-external-tests.patch --- python-halberd-0.2.4/debian/patches/disable-external-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-halberd-0.2.4/debian/patches/disable-external-tests.patch 2015-11-22 21:38:26.000000000 +0000 @@ -0,0 +1,102 @@ +Description: Disable tests requiring internet connection + Some tests are requiring an active internet connection to sourceforge. + Disabling them +Author: Gianfranco Costamagna +Bug-Debian: https://bugs.debian.org/805781 + +diff --git a/tests/test_clientlib.py b/tests/test_clientlib.py +index d1b174d..6c5ca32 100644 +--- a/tests/test_clientlib.py ++++ b/tests/test_clientlib.py +@@ -82,30 +82,30 @@ class TestHTTPClient(unittest.TestCase): + except clientlib.ConnectionRefused: + return + +- def testSendRequestToRemote(self): +- self.client._putRequest('66.35.250.203', 'http://www.sourceforge.net') +- timestamp, headers = self.client._getReply() +- self.failUnless(headers and headers.startswith('HTTP/')) +- +- def testGetHeaders(self): +- addr, url = '66.35.250.203', 'http://www.sourceforge.net' +- reply = self.client.getHeaders(addr, url) +- self.failUnless(reply != (None, None)) +- +- def testIncorrectReading(self): +- """Check for bug in _getReply (issue 60) +- Incorrect reading procedure in Halberd.clientlib.HTTPClient._getReply +- """ +- self.client.bufsize = 1 +- self.client.timeout = 10 +- addr, url = '127.0.0.1', 'http://localhost' +- self.client._putRequest(addr, url) +- try: +- timestamp, headers = self.client._getReply() +- except clientlib.TimedOut, msg: +- self.fail('Timed out while trying to read terminator') +- self.failUnless(headers) +- ++# def testSendRequestToRemote(self): ++# self.client._putRequest('66.35.250.203', 'http://www.sourceforge.net') ++# timestamp, headers = self.client._getReply() ++# self.failUnless(headers and headers.startswith('HTTP/')) ++# ++# def testGetHeaders(self): ++# addr, url = '66.35.250.203', 'http://www.sourceforge.net' ++# reply = self.client.getHeaders(addr, url) ++# self.failUnless(reply != (None, None)) ++# ++# def testIncorrectReading(self): ++# """Check for bug in _getReply (issue 60) ++# Incorrect reading procedure in Halberd.clientlib.HTTPClient._getReply ++# """ ++# self.client.bufsize = 1 ++# self.client.timeout = 10 ++# addr, url = '127.0.0.1', 'http://localhost' ++# self.client._putRequest(addr, url) ++# try: ++# timestamp, headers = self.client._getReply() ++# except clientlib.TimedOut, msg: ++# self.fail('Timed out while trying to read terminator') ++# self.failUnless(headers) ++# + + class TestHTTPSClient(unittest.TestCase): + +@@ -119,21 +119,21 @@ class TestHTTPSClient(unittest.TestCase): + self.failUnlessEqual(self.client._getHostAndPort('secure:777'), + ('secure', 777)) + +- def testConnect(self): +- clientlib.HTTPSClient()._connect(('www.sourceforge.net', 443)) +- +- def testInvalidConnect(self): +- self.failUnlessRaises(clientlib.HTTPSError, +- clientlib.HTTPSClient()._connect, +- ('localhost', 80)) +- +- # XXX For better testing a keyfile and a certificate should be used. +- +- def testSendRequestToRemote(self): +- self.client._putRequest('66.35.250.203', 'https://www.sourceforge.net') +- timestamp, headers = self.client._getReply() +- self.failUnless(headers != None and headers.startswith('HTTP/')) +- ++# def testConnect(self): ++# clientlib.HTTPSClient()._connect(('www.sourceforge.net', 443)) ++# ++# def testInvalidConnect(self): ++# self.failUnlessRaises(clientlib.HTTPSError, ++# clientlib.HTTPSClient()._connect, ++# ('localhost', 80)) ++# ++# # XXX For better testing a keyfile and a certificate should be used. ++# ++# def testSendRequestToRemote(self): ++# self.client._putRequest('66.35.250.203', 'https://www.sourceforge.net') ++# timestamp, headers = self.client._getReply() ++# self.failUnless(headers != None and headers.startswith('HTTP/')) ++# + + if __name__ == '__main__': + unittest.main() diff -Nru python-halberd-0.2.4/debian/patches/series python-halberd-0.2.4/debian/patches/series --- python-halberd-0.2.4/debian/patches/series 2015-08-07 16:32:00.000000000 +0000 +++ python-halberd-0.2.4/debian/patches/series 2015-11-22 21:27:23.000000000 +0000 @@ -1,2 +1,3 @@ disable-manpage-in-FSSTND-dir.patch fix-manpage.patch +disable-external-tests.patch