def test_replacement_order():
    """Ensure output replacements happen before the valid filename function is run
    """
    out_data = run_tvnamer(
        with_files = ['24.s03.e02.avi'],
        with_config = """
{
    "output_filename_replacements": [
        {"is_regex": false,
        "match": ":",
        "replacement": "-"}
    ],
    "always_rename": true,
    "select_first": true
}
""")

    expected_files = ['24 - [03x02] - Day 3- 2-00 P.M. - 3-00 P.M..avi']

    verify_out_data(out_data, expected_files)
Ensure output replacements happen before the valid filename function is run
    
tests/test_custom_replacement.py