From aa5094fa6f488db3d3d9148e2fbd6a0acf43ffe8 Mon Sep 17 00:00:00 2001 From: "Christian T. Jacobs" Date: Thu, 6 Jul 2017 21:09:36 +0100 Subject: [PATCH] Use HTTPS when looking up via hamqth.com --- tests/test_callsign_lookup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_callsign_lookup.py b/tests/test_callsign_lookup.py index 5470980..5899c4d 100644 --- a/tests/test_callsign_lookup.py +++ b/tests/test_callsign_lookup.py @@ -90,9 +90,9 @@ class TestCallsignLookup(unittest.TestCase): def test_hamqth_connect(self): """ Check the example response from the hamqth.com server, and make sure the session ID has been correctly extracted. """ - http_client.HTTPConnection = mock.Mock(spec=http_client.HTTPConnection) + http_client.HTTPSConnection = mock.Mock(spec=http_client.HTTPSConnection) http_client.HTTPResponse = mock.Mock(spec=http_client.HTTPResponse) - connection = http_client.HTTPConnection() + connection = http_client.HTTPSConnection() response = http_client.HTTPResponse() response.read.return_value = b'\n\n\n09b0ae90050be03c452ad235a1f2915ad684393c\n\n\n' @@ -105,9 +105,9 @@ class TestCallsignLookup(unittest.TestCase): def test_hamqth_lookup(self): """ Check the example callsign lookup response from the hamqth.com server, and make sure the callsign information has been correctly extracted. """ - http_client.HTTPConnection = mock.Mock(spec=http_client.HTTPConnection) + http_client.HTTPSConnection = mock.Mock(spec=http_client.HTTPSConnection) http_client.HTTPResponse = mock.Mock(spec=http_client.HTTPResponse) - connection = http_client.HTTPConnection() + connection = http_client.HTTPSConnection() response = http_client.HTTPResponse() response.read.return_value = b'\n\n\nMYCALL\nNAME\nCOUNTRY\nITU\nCQ\nGRID\nADDRESS\n\n\n'