In Python 3.3, hash randomization is enabled by default. It causes the iteration order of dicts and sets to be unpredictable and differ across Python runs. Sort the metadata.keys() in reverse order to keep the test cases as is. Change-Id: I233ada4dae4e9c0bc97bf8fd7d912a0eff9dd5b8 Signed-off-by: Chuck Short <chuck.short@canonical.com>