def test_regex_input_replacements():
    """Tests regex replacement in input files
    """
    out_data = run_tvnamer(
        with_files = ['scruuuuuubs.s01e01.avi'],
        with_config = """
{
    "input_filename_replacements": [
        {"is_regex": true,
        "match": "[u]+",
        "replacement": "u"}
    ],
    "always_rename": true,
    "select_first": true
}
""")

    expected_files = ['Scrubs - [01x01] - My First Day.avi']

    verify_out_data(out_data, expected_files)
Tests regex replacement in input files
    
tests/test_custom_replacement.py