[test] fix text_to_dict doctest (closes #174440) [applied]