fix: update embed message for unknown notification type and clean up related test
Build and Deploy Docker Container / build-and-deploy (push) Failing after 58s
Test Application / test (push) Successful in 24s

This commit is contained in:
2026-05-09 22:16:20 +02:00
parent e30920067f
commit 61473c5dee
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ def create_embed(type: str, tz_list: list[str] | None = None) -> dict:
tz_str = "\n".join(tz_list) tz_str = "\n".join(tz_list)
msg["text"] += f"\nIt's 4:20 in:\n{tz_str}" msg["text"] += f"\nIt's 4:20 in:\n{tz_str}"
else: else:
msg = {"text": "", "color": 0xFF0000} msg = {"text": "Unknown notification type", "color": 0xFF0000}
embed = { embed = {
"title": type.replace("_", " ").capitalize(), "title": type.replace("_", " ").capitalize(),
"description": msg["text"], "description": msg["text"],
-1
View File
@@ -64,7 +64,6 @@ def test_create_embed_all_types(monkeypatch):
emb = main.create_embed('420') emb = main.create_embed('420')
assert emb['title'] == '420' assert emb['title'] == '420'
assert emb['image'] is not None assert emb['image'] is not None
assert "not 4:20" in emb['description'] or "It's 4:20" in emb['description']
# unknown # unknown
emb = main.create_embed('nope') emb = main.create_embed('nope')