def testDCJSON(self): """Test output and re-JSONing of JSON export.""" dcjson = generate_dc_json(UNTL_DICT.copy()) j = json.loads(dcjson) self.assertTrue(type(j), dict) for key, value in j.items(): self.assertTrue(key in UNTL_DICT, '%s not in %s' % (key, UNTL_DICT))
def test_complete_record(self): """Test each tag appears as created from the dict keys.""" self.record = untldict2py(UNTL_DICT) for c in self.record.children: self.assertTrue(c.tag in UNTL_DICT.keys())