To avoid this "name splitting" hack and also test that the filename is set correctly, you can mock datetime to make it return a date that you are expecting. Check https://github.com/mozilla/remo/blob/master/remo/reports/tests/test_commands.py#L26 on how to do this.