Update tests to use format_result