from bai_kafka_utils.events import ContentSizeInfo
from preflight.http_estimator import http_estimate_size

BIG_FILE = "http://dataserver:8080/big-file"

# Test environment has a file with a line "HUGE FILE", which is 9 bytes.
# File is defined in benchmark-ai/mock-infra/internet.yml
HUGE_SIZE = 9


def test_http_estimator():
    assert http_estimate_size(BIG_FILE) == ContentSizeInfo(HUGE_SIZE, 1, HUGE_SIZE)
