def test_wrong_node_type_all(self):
     """
     Ensure full asset sections with the wrong tag are detected.
     """
     root = etree.Element("glassets")
     with self.assertRaises(ContractNotRespected):
         AssetMetadata.add_all_assets_as_xml(root, self.course_assets)
예제 #2
0
 def test_wrong_node_type_all(self):
     """
     Ensure full asset sections with the wrong tag are detected.
     """
     root = etree.Element("glassets")
     with self.assertRaises(ContractNotRespected):
         AssetMetadata.add_all_assets_as_xml(root, self.course_assets)
 def test_export_all_assets_to_xml(self):
     """
     Export all AssetMetadatas to XML and verify the structure and fields.
     """
     root = etree.Element("assets")
     AssetMetadata.add_all_assets_as_xml(root, self.course_assets)
     # If this line does *not* raise, the XML is valid.
     etree.fromstring(etree.tostring(root), self.xmlparser)
예제 #4
0
 def test_export_all_assets_to_xml(self):
     """
     Export all AssetMetadatas to XML and verify the structure and fields.
     """
     root = etree.Element("assets")
     AssetMetadata.add_all_assets_as_xml(root, self.course_assets)
     # If this line does *not* raise, the XML is valid.
     etree.fromstring(etree.tostring(root), self.xmlparser)