def test_rename_for_airflow(): pairs = [ ("foo", "foo"), ("this-is-valid", "this-is-valid"), ( "a" * AIRFLOW_MAX_DAG_NAME_LEN + "very long strings are disallowed", "a" * AIRFLOW_MAX_DAG_NAME_LEN, ), ("a name with illegal spaces", "a_name_with_illegal_spaces"), ("a#name$with@special*chars!!!", "a_name_with_special_chars___"), ] for before, after in pairs: assert after == _rename_for_airflow(before)
def test_rename_for_airflow(): pairs = [ ('foo', 'foo'), ('this-is-valid', 'this-is-valid'), ( 'a' * AIRFLOW_MAX_DAG_NAME_LEN + 'very long strings are disallowed', 'a' * AIRFLOW_MAX_DAG_NAME_LEN, ), ('a name with illegal spaces', 'a_name_with_illegal_spaces'), ('a#name$with@special*chars!!!', 'a_name_with_special_chars___'), ] for before, after in pairs: assert after == _rename_for_airflow(before)