Skip to content

Commit

Permalink
tests: add test_add
Browse files Browse the repository at this point in the history
  • Loading branch information
sullyj3 committed Aug 4, 2024
1 parent a79fb50 commit b8c9383
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,21 @@ def run_client(sock_path, args):
return (status, output)

class TestClient:
def test_client_list(self, daemon):

def test_list_none(self, daemon):
(status, output) = run_client(SOCKET_PATH, ["list"])

assert status == 0, f"Client exited with status {status}"
expected_stdout = "No running timers."
assert output.strip() == expected_stdout

def test_add(self, daemon):
(status, output) = run_client(SOCKET_PATH, ["10m"])
assert status == 0, f"Client exited with status {status}"
expected_stdout = "Timer #1 created for 00:10:00:000."
assert output.strip() == expected_stdout




@pytest.fixture
def client_socket():
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as client_sock:
Expand Down

0 comments on commit b8c9383

Please sign in to comment.