from abuseipdb import CATEGORIES, AbuseCategory


def test_categories_match_all_upstream_ids() -> None:
    expected = {
        "DNS_Compromise": 1,
        "DNS_Poisoning": 2,
        "Fraud_Orders": 3,
        "DDoS_Attack": 4,
        "FTP_Brute_Force": 5,
        "Ping_of_Death": 6,
        "Phishing": 7,
        "Fraud_VoIP": 8,
        "Open_Proxy": 9,
        "Web_Spam": 10,
        "Email_Spam": 11,
        "Blog_Spam": 12,
        "VPN_IP": 13,
        "Port_Scan": 14,
        "Hacking": 15,
        "SQL_Injection": 16,
        "Spoofing": 17,
        "Brute_Force": 18,
        "Bad_Web_Bot": 19,
        "Exploited_Host": 20,
        "Web_App_Attack": 21,
        "SSH": 22,
        "IoT_Targeted": 23,
    }
    assert CATEGORIES == expected
    assert AbuseCategory.BRUTE_FORCE == 18
    assert int(AbuseCategory.SSH) == 22
