Skip to content

The agent that grows with you

test(buzz): isolate authorization cases from CLI lookup

EmpireOperatingf857f13b30cd
diff --git a/tests/gateway/test_buzz_adapter.py b/tests/gateway/test_buzz_adapter.py
index 849b87d859b..bd4f875252e 100644
--- a/tests/gateway/test_buzz_adapter.py
+++ b/tests/gateway/test_buzz_adapter.py
@@ -1345,6 +1345,8 @@ class TestInboundAttachments:
authorization,
):
adapter = _make_adapter()
+ adapter._run_cli = AsyncMock(side_effect=AssertionError("authorization test invoked Buzz CLI"))
+ adapter._resolve_user_name = AsyncMock(return_value="Other")
adapter._allowed_pubkeys = {OTHER_PUBKEY}
if authorization is None:
adapter.set_authorization_check(None)
@@ -1385,6 +1387,8 @@ class TestInboundAttachments:
@pytest.mark.asyncio
async def test_explicit_true_gateway_authority_caches_attachment(self):
adapter = _make_adapter()
+ adapter._run_cli = AsyncMock(side_effect=AssertionError("authorization test invoked Buzz CLI"))
+ adapter._resolve_user_name = AsyncMock(return_value="Other")
authorization_check = MagicMock(return_value=True)
adapter.set_authorization_check(authorization_check)
cached = CachedMedia(
@@ -1435,6 +1439,8 @@ class TestInboundAttachments:
runner.pairing_store.is_approved.return_value = False
adapter = _make_adapter()
+ adapter._run_cli = AsyncMock(side_effect=AssertionError("authorization test invoked Buzz CLI"))
+ adapter._resolve_user_name = AsyncMock(return_value="Other")
adapter._allowed_pubkeys = {OTHER_PUBKEY}
adapter.set_authorization_check(runner._make_adapter_auth_check(adapter.platform))
adapter._cache_inbound_attachments = AsyncMock()