'Check if the contents of the dictionary are the same as a
repeated keyval pair.'

def check_dict(self, dictionary, keyval):

    for (key, value) in dictionary.iteritems():
        self.assertTrue((key in keyval))
        self.assertEqual(str(value), keyval[key])
