summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-10-20 15:18:49 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2024-10-20 15:18:49 -0400
commit9fd83de059a9199827dfcfe4397051ec878cfea8 (patch)
tree677fd08c7b62b2baea8cb0ed41edcd01174072d5 /tests
parentAdd python 3.12 and 3.13 as supported versions (diff)
downloadlirc-9fd83de059a9199827dfcfe4397051ec878cfea8.zip
Update workflows, use ruff for linting, and drop EOL python versions
Diffstat (limited to 'tests')
-rw-r--r--tests/test_client.py2
-rw-r--r--tests/test_lircd_connection.py4
2 files changed, 3 insertions, 3 deletions
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"])