tests: build the filename from the info_dict if the 'file' key is missing