from cancontech_tracing.ctracing_otl_span_exporter import CtracingOTLSpanExporter


def test_exporter_applies_headers_and_user_agent():
    exporter = CtracingOTLSpanExporter(
        endpoint="http://127.0.0.1:6006/v1/traces",
        user_agent="x-test-agent",
        headers={"authorization": "Bearer test-token"},
    )

    assert exporter._session.headers.get("User-Agent") == "x-test-agent"
    assert exporter._session.headers.get("authorization") == "Bearer test-token"
