mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-07-30 15:26:14 +00:00
remove test for .well-known/ bypass (path no longer routed)
The .well-known/ path was removed from Tinfoil attestation routing since Tinfoil doesn't use it. The test that asserted GET /.well-known/ bypasses model lookup is no longer valid.
This commit is contained in:
@@ -93,26 +93,3 @@ def test_attestation_upstream_selection_is_tinfoil_only() -> None:
|
||||
"tee/other", [non_tinfoil, tinfoil]
|
||||
) == [non_tinfoil, tinfoil]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_well_known_get_bypasses_model_lookup(
|
||||
monkeypatch: pytest.MonkeyPatch, proxy_app: FastAPI
|
||||
) -> None:
|
||||
upstream = MagicMock()
|
||||
upstream.provider_type = "openai"
|
||||
upstream.prepare_headers = MagicMock(return_value={})
|
||||
upstream.forward_get_request = AsyncMock(
|
||||
return_value=Response(status_code=200, content=b"lnurl metadata")
|
||||
)
|
||||
|
||||
monkeypatch.setattr(proxy_module, "_upstreams", [upstream])
|
||||
monkeypatch.setattr(proxy_module, "get_model_instance", MagicMock(side_effect=AssertionError))
|
||||
|
||||
async with AsyncClient(
|
||||
transport=ASGITransport(app=proxy_app), base_url="http://test" # type: ignore[arg-type]
|
||||
) as client:
|
||||
response = await client.get("/.well-known/lnurlp/alice")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.content == b"lnurl metadata"
|
||||
upstream.forward_get_request.assert_awaited_once()
|
||||
|
||||
Reference in New Issue
Block a user