mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:23:23 +08:00
- Rename platform/ to svc/ to avoid shadowing stdlib platform. - Replace from oclaw.* with from svc/runtime/interfaces; update -m CLI paths. - tests/conftest: prepend repo root to sys.path (no parent-folder package name). - CI: paths and offline_eval script under repo root. - Ops scripts: PYTHONPATH must be repo root for python -m runtime.* (fixes gateway/WhatsApp sidecar startup). - Fix default oclaw.json path in tabular/file attachment limits; stabilize attachment test config. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
732 B
Python
18 lines
732 B
Python
from __future__ import annotations
|
|
|
|
from runtime.hooks.gmail_watcher import start_gmail_watcher
|
|
|
|
|
|
def test_start_gmail_watcher_top_level_hooks_disabled() -> None:
|
|
r = start_gmail_watcher({"hooks": {"enabled": False, "internal": {"enabled": True}}})
|
|
assert r.started is False and r.reason == "hooks not enabled"
|
|
|
|
|
|
def test_start_gmail_watcher_internal_disabled() -> None:
|
|
r = start_gmail_watcher({"hooks": {"internal": {"enabled": False}}})
|
|
assert r.started is False and r.reason == "hooks not enabled"
|
|
|
|
|
|
def test_start_gmail_watcher_no_account() -> None:
|
|
r = start_gmail_watcher({"hooks": {"internal": {"enabled": True}, "gmail": {}}})
|
|
assert r.started is False and r.reason == "no gmail account configured"
|