test(calendar): cover update_event with foreign timezone (Asia/Hong_Kong)
This commit is contained in:
1 parent
5131f77a5c
commit
7e82b09233
1 file changed
+11
@@ -348,6 +348,17 @@ class TestCalendar:
|
|||||||
created.append((self.CAL1, uids[0]))
|
created.append((self.CAL1, uids[0]))
|
||||||
assert re.search(r"T18:00:00\+08:00", found), (
|
assert re.search(r"T18:00:00\+08:00", found), (
|
||||||
f"HK-Termin nicht in +08:00 gespeichert: {found[:300]}")
|
f"HK-Termin nicht in +08:00 gespeichert: {found[:300]}")
|
||||||
|
# update_event mit anderer Zeitzone
|
||||||
|
r = tool_call(self.PORT, token, "update_event", {
|
||||||
|
"calendar": self.CAL1, "uid": uids[0], "title": tag,
|
||||||
|
"start": "2026-11-05T20:30", "end": "2026-11-05T21:30",
|
||||||
|
"timezone": "Asia/Hong_Kong",
|
||||||
|
})
|
||||||
|
assert "aktualisiert" in r.lower() or "updated" in r.lower(), f"update_event failed: {r}"
|
||||||
|
found2 = tool_call(self.PORT, token, "search_events",
|
||||||
|
{"query": tag, "date_from": "2026-11-01", "date_to": "2026-11-10"})
|
||||||
|
assert re.search(r"T20:30:00\+08:00", found2), (
|
||||||
|
f"HK-Update nicht in +08:00 gespeichert: {found2[:300]}")
|
||||||
# ungueltige Zeitzone -> sauberer Fehler statt Exception
|
# ungueltige Zeitzone -> sauberer Fehler statt Exception
|
||||||
bad = tool_call(self.PORT, token, "create_event", {
|
bad = tool_call(self.PORT, token, "create_event", {
|
||||||
"calendar": self.CAL1, "title": f"{tag}-bad",
|
"calendar": self.CAL1, "title": f"{tag}-bad",
|
||||||
|
|||||||
Reference in new issue
Block a user