"""Integration tests for workers commands."""

from __future__ import annotations

from cf_mcp.client import CloudflareClient
from cf_mcp.commands.workers import list_workers
from cf_mcp.config import Settings


async def test_list_workers(client: CloudflareClient, settings: Settings):
    workers = await list_workers(client, settings)
    assert isinstance(workers, list)
    assert len(workers) > 0

    w = workers[0]
    assert "id" in w
    assert "modified_on" in w
