def test_copy(self): dict1 = xmlstring2dict(xmlstr, use_ord_dict=False, always_singular_list=[]) ordered_dict = OrderedDict(dict1) od2 = ordered_dict.copy() self.assertEqual(od2.__repr__(), ordered_dict.__repr__())
def test___delitem__(self): dict1 = xmlstring2dict(xmlstr, use_ord_dict=False, always_singular_list=[]) ordered_dict = OrderedDict(dict1) od2 = ordered_dict.copy() ordered_dict.__delitem__('temperature') self.assertTrue('temperature' in od2) self.assertFalse('temperature' in ordered_dict)