예제 #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')