def testTemplateInit(self): dc = DublinCore() dc.title = 'foo' # if dc namespace is not used it will be cleaned/removed dc_xml = dc.serialize() self.assert_(b'<oai_dc:dc ' in dc_xml) self.assert_(b'xmlns:dc="http://purl.org/dc/elements/1.1/"' in dc_xml) self.assert_(b'xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"' in dc_xml)
def testTemplateInit(self): dc = DublinCore() dc_xml = dc.serialize() self.assert_('<oai_dc:dc ' in dc_xml) self.assert_('xmlns:dc="http://purl.org/dc/elements/1.1/"' in dc_xml) self.assert_('xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"' in dc_xml)