In Python 3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ across
Python runs.
In the test case, the fixed expecting string will not match the test
result, it is relying on the dict order.
This change transforms the input dict to a sequence of two-element list,
with fixed order, and update the related expecitng string.
Close-Bug #1231871
Change-Id: Ia998cdb6978fc024dd0d3c9bd161fbdebe68638a