Is this test robust? The key order in a dict isn't guaranteed.