From 29e954d1040accafcf60ecc22031ba364f65a717 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 11 Sep 2020 15:25:07 -0700 Subject: [PATCH] Black --- adafruit_requests.py | 2 ++ tests/legacy_test.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/adafruit_requests.py b/adafruit_requests.py index f594b72..72e231b 100755 --- a/adafruit_requests.py +++ b/adafruit_requests.py @@ -527,6 +527,7 @@ def delete(self, url, **kw): _default_session = None # pylint: disable=invalid-name + class _FakeSSLSocket: def __init__(self, socket, tls_mode): self._socket = socket @@ -538,6 +539,7 @@ def __init__(self, socket, tls_mode): def connect(self, address): return self._socket.connect(address, self._mode) + class _FakeSSLContext: def __init__(self, iface): self._iface = iface diff --git a/tests/legacy_test.py b/tests/legacy_test.py index b943c36..3d9cdbb 100644 --- a/tests/legacy_test.py +++ b/tests/legacy_test.py @@ -24,6 +24,7 @@ def test_get_json(): assert r.json() == response r.close() + def test_tls_mode(): mocket.getaddrinfo.return_value = ((None, None, None, None, (ip, 80)),) sock = mocket.Mocket(headers + encoded) @@ -36,6 +37,7 @@ def test_tls_mode(): assert r.json() == response r.close() + def test_post_string(): mocket.getaddrinfo.return_value = ((None, None, None, None, (ip, 80)),) sock = mocket.Mocket(headers + encoded)