Changed iteritems to items for python3.X
Correction of test on deleting index