Skip to content

Commit

Permalink
make the trivial test an actual test
Browse files Browse the repository at this point in the history
  • Loading branch information
sullyj3 committed Jul 31, 2024
1 parent add8182 commit 7d72d49
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,19 @@ def run_client_tests():

client_sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
client_sock.connect(SOCKET_PATH)
client_sock.send(b'"list"')

# test list
msg = b'"list"'
client_sock.send(msg)
response = client_sock.recv(1024)
print(f"-- Received response: {response}")
expected = b'{"ok": {"timers": []}}'
if response != expected:
print(f"sent: {msg}")
print(f"expected: {expected}")
print(f"received: {response}")
sys.exit(1)

print("All tests passed")
client_sock.close()

if __name__ == "__main__":
Expand Down

0 comments on commit 7d72d49

Please sign in to comment.