From 7f99167f0b6a3c83bf77e20bc5e03942b901fb71 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 9 Nov 2026 18:25:59 +0100 Subject: fix: OBS idle timeout, payload validation, workspace list --- tests/test_windows.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_windows.py') diff --git a/tests/test_windows.py b/tests/test_windows.py index 1573a77..6aa7925 100644 --- a/tests/test_windows.py +++ b/tests/test_windows.py @@ -18,6 +18,16 @@ class Commands(unittest.TestCase): self.assertIsNone(windows.ADDR.fullmatch("0x1;rm")) self.assertTrue(windows.ADDR.fullmatch("0x55897e5c0800")) + def test_state_lists_all_workspaces(self): + responses = { + ("hyprctl", "clients", "-j"): "[]", + ("hyprctl", "activewindow", "-j"): "{}", + ("hyprctl", "monitors", "-j"): "[]", + ("hyprctl", "workspaces", "-j"): '[{"id": 1}, {"id": 2}, {"id": 5}]', + } + st = windows._state(lambda cmd: responses[tuple(cmd)]) + self.assertEqual(st["workspaces"], [1, 2, 5]) + if __name__ == "__main__": unittest.main() -- cgit v1.2.3