示例#1
0
 def test_parse_full(self):
     element = ElementTree.XML(IQ2)
     payload = VersionPayload.from_xml(element[0])
     self.assertEqual(payload.name, "NAME")
     self.assertEqual(payload.version, "VERSION")
     self.assertEqual(payload.os_name, "OS")
示例#2
0
 def test_parse_empty(self):
     element = ElementTree.XML(IQ1)
     payload = VersionPayload.from_xml(element[0])
     self.assertIsNone(payload.name)
     self.assertIsNone(payload.version)
     self.assertIsNone(payload.os_name)
示例#3
0
 def test_parse_empty(self):
     element = ElementTree.XML(IQ1)
     payload = VersionPayload.from_xml(element[0])
     self.assertIsNone(payload.name)
     self.assertIsNone(payload.version)
     self.assertIsNone(payload.os_name)
示例#4
0
 def test_parse_full(self):
     element = ElementTree.XML(IQ2)
     payload = VersionPayload.from_xml(element[0])
     self.assertEqual(payload.name, 'NAME')
     self.assertEqual(payload.version, 'VERSION')
     self.assertEqual(payload.os_name, 'OS')
 def test_parse_full(self):
     element = ElementTree.XML(IQ2)
     payload = VersionPayload.from_xml(element[0])
     self.assertEqual(payload.name, 'NAME')
     self.assertEqual(payload.version, 'VERSION')
     self.assertEqual(payload.os_name, 'OS')