diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 19:50:49 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 19:50:49 +0100 |
| commit | 2ba4e3d3ea64081904677896d7a8dc1faa3ac912 (patch) | |
| tree | 675e29227ca77ebc7bbc23e7959a10ed992f124c /tests/test_config.py | |
| parent | 6c7f59dbff8937210106bafd8a261284dcd33662 (diff) | |
| download | deck-it-2ba4e3d3ea64081904677896d7a8dc1faa3ac912.tar.gz deck-it-2ba4e3d3ea64081904677896d7a8dc1faa3ac912.zip | |
feat(config): the dashboard's action list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_config.py')
| -rw-r--r-- | tests/test_config.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 928a8e8..906d8d3 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -39,10 +39,17 @@ class Config(unittest.TestCase): {"ports": {"command_center": 80}}, {"ports": {"command_center": 5900, "display": 5900}}, {"wifi": {"address": "x; rm -rf ~"}}, - {"launch": {"apps": ["ok", "../evil"]}}] + {"launch": {"apps": ["ok", "../evil"]}}, + {"dashboard": {"actions": ["screenshot", "rm -rf"]}}, + {"dashboard": {"actions": "lock"}}] for cfg in bad: self.assertIsNotNone(config.config_error(cfg), cfg) + def test_dashboard_actions(self): + self.assertIsNone(config.config_error({"dashboard": {"actions": []}})) + self.assertIsNone(config.config_error({"dashboard": {"actions": ["lock", "screenshot"]}})) + self.assertEqual(config.ACTION_IDS, ("screenshot", "lock")) + def test_user_file_overrides_key_by_key(self): cfg = config.merge({"display": {"enabled": True, "scale": 1}, "launch": {"apps": ["a", "b"]}}, {"display": {"enabled": False}, "launch": {"apps": ["c"]}}) |
