From 9fd83de059a9199827dfcfe4397051ec878cfea8 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Oct 2024 15:18:49 -0400 Subject: Update workflows, use ruff for linting, and drop EOL python versions --- tests/test_client.py | 2 +- tests/test_lircd_connection.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_client.py b/tests/test_client.py index b930f5d..152f384 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -165,5 +165,5 @@ def test_last_send_start_remote_and_key_is_used(mock_client_and_connection): client.send_stop() # SUT connection._socket.sendall.assert_called_with( - "SEND_STOP remote key\n".encode("utf-8") + b"SEND_STOP remote key\n" ) diff --git a/tests/test_lircd_connection.py b/tests/test_lircd_connection.py index f8693b4..cfd3590 100644 --- a/tests/test_lircd_connection.py +++ b/tests/test_lircd_connection.py @@ -98,7 +98,7 @@ def test_that_send_adds_a_newline_to_the_end(mock_connection, test_command): mock_connection.send(test_command) # SUT mock_connection._socket.sendall.assert_called_with( - f"{test_command}\n".encode("utf-8") + f"{test_command}\n".encode() ) @@ -113,7 +113,7 @@ def test_that_send_does_not_add_too_many_newlines(mock_connection): mock_connection.send(command) # SUT - mock_connection._socket.sendall.assert_called_with(f"{command}".encode("utf-8")) + mock_connection._socket.sendall.assert_called_with(f"{command}".encode()) @pytest.mark.parametrize("test_command", [5, False, 0.1, b"hello"]) -- cgit v1.2.3