from cyclone.parsers.payer import PayerConfig


def test_co_medicaid_defaults():
    cfg = PayerConfig.co_medicaid()
    assert cfg.name == "Colorado Medical Assistance Program"
    assert cfg.sbr09_claim_filing == "MC"
    assert cfg.allowed_claim_frequencies == {1, 7, 8}
    assert cfg.require_ref_g1_for_adjustments is False  # lenient in v1
    assert cfg.allowed_bht06 == {"CH"}
    assert cfg.payer_id == "SKCO0"
    assert cfg.payer_name == "COHCPF"
    assert cfg.no_patient_loop is True
    assert cfg.encounter_claim_in_same_batch is False


def test_generic_837p_defaults_are_relaxed():
    cfg = PayerConfig.generic_837p()
    assert cfg.name == "Generic 837P"
    assert cfg.allowed_claim_frequencies == {1, 2, 3, 4, 5, 6, 7, 8, 9}
    assert cfg.no_patient_loop is False
    assert cfg.payer_id == ""  # unset
