def test_csv(distribution):
    """
    Test if a DCAT:distribution is CSV.
    """
    return (
        distribution.get("mediaType") == "text/csv"
        or distribution.get("format", "").lower() == "csv"
    )