Ordered Dictionary Test in Python