def test_description_output(self): incident = incident_binding.IncidentType() assets = incident_binding.AffectedAssetsType() asset = incident_binding.AffectedAssetType() description = StructuredText("A Description") asset.Structured_Description = description.to_obj() assets.add_Affected_Asset(asset) incident.Affected_Assets = assets s = StringIO.StringIO() incident.export(s.write, 0, {'http://stix.mitre.org/Incident-1': 'incident'}) xml = s.getvalue() self.assertTrue("A Description" in xml, "Description not exported")
def test_description_output(self): incident = incident_binding.IncidentType() assets = incident_binding.AffectedAssetsType() asset = incident_binding.AffectedAssetType() description = StructuredText("A Description") asset.set_Structured_Description(description.to_obj()) assets.add_Affected_Asset(asset) incident.set_Affected_Assets(assets) s = StringIO() incident.export(s, 0, {'http://stix.mitre.org/Incident-1': 'incident'}) xml = s.getvalue() self.assertTrue("A Description" in xml, "Description not exported")