From 091834f1aeee34bc57b7c2c0ae1f89a344339c56 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 20 Apr 2026 12:32:35 -0700 Subject: [PATCH] test: add missing update_template KeyError test (#74) --- tests/test_messaging.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_messaging.py b/tests/test_messaging.py index 4e69648..9ae3207 100644 --- a/tests/test_messaging.py +++ b/tests/test_messaging.py @@ -369,6 +369,12 @@ class TestUpdateTemplate: with pytest.raises(PermissionError): update_template(db_path, builtin["id"], title="Hacked") + def test_update_missing_raises_key_error(self, db_path): + from scripts.messaging import update_template + + with pytest.raises(KeyError): + update_template(db_path, 9999, title="Ghost") + class TestDeleteTemplate: def test_delete_user_template(self, db_path: Path) -> None: