tests:api: fix incorrect assumption about lexicographic ordering

Text handling is hard :(.