Use iteritems and itervalues functions in tests