Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

test(update): mock release-notification policy in 3.0.4 update-checker tests (#654)

Call Whiteba5f9d84290d
diff --git a/tests/test_update_checker_platforms.py b/tests/test_update_checker_platforms.py
index b7e97923a..86cfe0284 100644
--- a/tests/test_update_checker_platforms.py
+++ b/tests/test_update_checker_platforms.py
@@ -381,6 +381,11 @@ def test_auto_update_skips_unattended_source_checkout_install(monkeypatch, tmp_p
"_fetch_pypi_version_sync",
lambda: {"current": "3.0.4.dev10+g4d621ef0a", "latest": "3.0.4", "has_update": True, "error": None},
)
+ monkeypatch.setattr(
+ update_checker,
+ "_fetch_update_notification_policy_sync",
+ lambda version: {"version": version, "policy": "default", "error": None},
+ )
monkeypatch.setattr(checker, "_is_idle", lambda: True)
monkeypatch.setattr(update_checker, "get_running_vibe_path", lambda: "/tmp/dev-vibe")
monkeypatch.setattr("vibe.runtime.get_service_main_path", lambda: Path("/repo/main.py"))
@@ -417,6 +422,11 @@ def test_restartless_auto_update_blocks_same_version_retry_and_notifies(monkeypa
"_fetch_pypi_version_sync",
lambda: {"current": "3.0.3", "latest": "3.0.4", "has_update": True, "error": None},
)
+ monkeypatch.setattr(
+ update_checker,
+ "_fetch_update_notification_policy_sync",
+ lambda version: {"version": version, "policy": "default", "error": None},
+ )
monkeypatch.setattr(checker, "_is_idle", lambda: True)
monkeypatch.setattr("vibe.runtime.get_service_main_path", lambda: Path("/pkg/service_main.py"))
monkeypatch.setattr(update_checker, "get_running_vibe_path", lambda: "/tmp/vibe")
@@ -454,6 +464,11 @@ def test_install_failure_auto_update_remains_retryable(monkeypatch, tmp_path):
"_fetch_pypi_version_sync",
lambda: {"current": "3.0.3", "latest": "3.0.4", "has_update": True, "error": None},
)
+ monkeypatch.setattr(
+ update_checker,
+ "_fetch_update_notification_policy_sync",
+ lambda version: {"version": version, "policy": "default", "error": None},
+ )
monkeypatch.setattr(checker, "_is_idle", lambda: True)
monkeypatch.setattr("vibe.runtime.get_service_main_path", lambda: Path("/pkg/service_main.py"))
monkeypatch.setattr(update_checker, "get_running_vibe_path", lambda: "/tmp/vibe")