diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 18:25:59 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 18:25:59 +0100 |
| commit | 7f99167f0b6a3c83bf77e20bc5e03942b901fb71 (patch) | |
| tree | 6b60263b6f702e6088eae30087c6dfa2a5a71f4c /tests/test_windows.py | |
| parent | 03e2adab3fb58532ba1e32c2f01a9ec14f11e484 (diff) | |
| download | deck-it-7f99167f0b6a3c83bf77e20bc5e03942b901fb71.tar.gz deck-it-7f99167f0b6a3c83bf77e20bc5e03942b901fb71.zip | |
fix: OBS idle timeout, payload validation, workspace list
Diffstat (limited to 'tests/test_windows.py')
| -rw-r--r-- | tests/test_windows.py | 10 |
1 files changed, 10 insertions, 0 deletions
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() |
