oclaw/tests/test_schedule_duration_parse.py
oliver 47813f6a94 feat(scheduler): add scheduled jobs with channel-aware delivery
Introduce persisted cron/interval jobs, gateway scheduler loop, worker turns,
and admin CRUD/edit UI. Route proactive reminders via the originating chat
channel (WhatsApp vs WeChat), harden Weixin outbound with durable queue and
PG-compatible polling, and fix chat UI to show each scheduled reminder separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 15:56:10 +08:00

20 lines
579 B
Python

from __future__ import annotations
import unittest
from runtime.application.gateway.inbound_service import _parse_schedule_duration_seconds
class ScheduleDurationParseTests(unittest.TestCase):
def test_minutes(self) -> None:
self.assertEqual(_parse_schedule_duration_seconds("5分钟"), 300)
def test_hours(self) -> None:
self.assertEqual(_parse_schedule_duration_seconds("1小时"), 3600)
def test_seconds(self) -> None:
self.assertEqual(_parse_schedule_duration_seconds("120秒"), 120)
if __name__ == "__main__":
unittest.main()