Fix roaming test failure on Python

Tuples were sorted by first item with order preserving in case of equal
values. This resulted with failure, when order differed. Now sort by
both items.