async def test_list_resources(client: BasicMCPClient):
    """Test listing resources from the server."""
    resources = await client.list_resources()

    # Check that we got a list of resources
    assert isinstance(resources, types.ListResourcesResult)
    assert len(resources.resources) > 0

    # Verify some expected resources are present
    resource_names = [str(resource.uri) for resource in resources.resources]
    assert "config://app" in resource_names
    assert "help://usage" in resource_names
    assert "counter://value" in resource_names
    assert "weather://current" in resource_names
Test listing resources from the server.
llama-index-integrations/tools/llama-index-tools-mcp/tests/test_client.py