Test disabled OpenCode navigation explicitly

This commit is contained in:
Nick Sweeting 2026-06-21 22:58:47 -07:00
parent 395beea104
commit 6fa3b5c9bb
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -100,6 +100,9 @@ def test_add_view_admin_renders_plugin_config_grid(client, admin_user, monkeypat
def test_add_view_hides_agent_link_when_opencode_is_disabled(client, admin_user):
from archivebox.machine.models import Machine
Machine.from_json({"config": {"OPENCODE_ENABLED": False}})
client.force_login(admin_user)
response = client.get(reverse("add"), HTTP_HOST=ADMIN_HOST)

View File

@ -240,6 +240,9 @@ def test_snapshot_admin_zip_links():
def test_admin_navigation_hides_agent_link_when_opencode_is_disabled(client, admin_user):
from archivebox.machine.models import Machine
Machine.from_json({"config": {"OPENCODE_ENABLED": False}})
client.force_login(admin_user)
response = client.get(reverse("admin:index"), HTTP_HOST="admin.archivebox.localhost:8000")