mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
Test disabled OpenCode navigation explicitly
This commit is contained in:
parent
395beea104
commit
6fa3b5c9bb
@ -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)
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user