"""Shared test fixtures for billing tests."""

from __future__ import annotations

import pytest
from billing.config import BillingConfig, init_billing


@pytest.fixture(autouse=True)
def billing_config():
    """Initialize billing with test configuration before each test."""
    config = BillingConfig(
        stripe_secret_key="sk_test_fake_key_for_testing",
        stripe_webhook_secret="whsec_test_fake_secret",
        success_url="https://example.com/success",
        cancel_url="https://example.com/cancel",
        product_plans={
            "starter": "price_starter_test",
            "pro": "price_pro_test",
            "enterprise": "price_enterprise_test",
        },
    )
    init_billing(config)
    return config
