Skip to content

Commit f7e0fbd

Browse files
author
Axel Dahlberg
committed
Updated doc, comment and variable-name
1 parent 97fb09d commit f7e0fbd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def get_mocked_socket(*args, **kwargs):
5555

5656

5757
class MockedFirstMessage:
58-
"""Mocks the second header returned by CQCConnection.readMessage"""
58+
"""Mocks the first header returned by CQCConnection.readMessage"""
5959
class MockedTypeEntry:
6060
def __eq__(self, other):
6161
"""This type will be equal to any integer."""

tests/test_cqcconnection.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ def test_commands(commands_to_apply, get_expected_headers, monkeypatch, mock_soc
6868

6969
expected_headers = get_expected_headers()
7070

71-
commands_send = list(filter(lambda call: call.name == 'send', cqc._s.calls))
72-
assert len(expected_headers) == len(commands_send)
73-
for command, expected in zip(commands_send, expected_headers):
71+
commands_sent = list(filter(lambda call: call.name == 'send', cqc._s.calls))
72+
assert len(expected_headers) == len(commands_sent)
73+
for command, expected in zip(commands_sent, expected_headers):
7474
print(command.args[0])
7575
print(expected)
7676
print()
77+
# Excluding None gives the opportunity to not specify all expected headers but still check the number of them
7778
if expected is not None:
7879
assert command.args[0] == expected

0 commit comments

Comments
 (0)