diff --git a/setup.py b/setup.py index e3f2565..fe7d4c6 100644 --- a/setup.py +++ b/setup.py @@ -7,10 +7,10 @@ setuptools.setup( name="doipclient", - version="1.1.0", + version="1.1.1", description="A Diagnostic over IP (DoIP) client implementing ISO-13400-2.", long_description=long_description, - long_description_content_type='text/x-rst', + long_description_content_type="text/x-rst", author="Jacob Schaer", url="https://github.com/jacobschaer/python-doipclient", packages=setuptools.find_packages(), diff --git a/tests/test_client.py b/tests/test_client.py index 1a2158b..080c91f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -695,7 +695,9 @@ def test_exception_from_blocking_ssl_socket(mock_socket, mocker): def test_use_secure_uses_default_ssl_context(mock_socket, mocker): """Wrap socket with default SSL-context when use_secure=True""" - mocked_default_context = mocker.patch.object(ssl, "create_default_context", autospec=True) + mocked_default_context = mocker.patch.object( + ssl, "create_default_context", autospec=True + ) sut = DoIPClient( test_ip, test_logical_address, use_secure=True, activation_type=None ) @@ -707,17 +709,24 @@ def test_use_secure_with_external_ssl_context(mock_socket, mocker): """Wrap socket with user provided SSL-context when use_secure=ssl_context""" original_context = ssl.SSLContext mocked_external_context = mocker.patch.object(ssl, "SSLContext", autospec=True) - mocked_default_context = mocker.patch.object(ssl, "create_default_context", autospec=True) + mocked_default_context = mocker.patch.object( + ssl, "create_default_context", autospec=True + ) # Unmock the SSLContext ssl.SSLContext = original_context sut = DoIPClient( - test_ip, test_logical_address, use_secure=mocked_external_context, activation_type=None + test_ip, + test_logical_address, + use_secure=mocked_external_context, + activation_type=None, ) mocked_default_wrap_socket = mocked_default_context.return_value.wrap_socket - assert not mocked_default_wrap_socket.called, "Socket should *not* get wrapped using default context." + assert ( + not mocked_default_wrap_socket.called + ), "Socket should *not* get wrapped using default context." mocked_external_wrap_socket = mocked_external_context.wrap_socket mocked_external_wrap_socket.assert_called_once_with(mock_socket)