Exemplo n.º 1
0
 def test_healthmonitors_json(self):
     actual_json = """
                     {{ "{root_tag}":
                         [{{
                             {actual_json_base}
                         }}]
                     }}
                     """.format(root_tag=self.ROOT_TAG,
                                actual_json_base=self.actual_json_base,
                                **self.healthmonitor_attribute_kwargs)
     actual_obj = HealthMonitors.deserialize(actual_json, 'json')
     self.assertEqual(self.expected_obj, actual_obj)
Exemplo n.º 2
0
 def test_healthmonitors_json(self):
     actual_json = """
                     {{ "{root_tag}":
                         [{{
                             {actual_json_base}
                         }}]
                     }}
                     """.format(root_tag=self.ROOT_TAG,
                                actual_json_base=self.actual_json_base,
                                **self.healthmonitor_attribute_kwargs)
     actual_obj = HealthMonitors.deserialize(actual_json, 'json')
     self.assertEqual(self.expected_obj, actual_obj)
Exemplo n.º 3
0
 def test_healthmonitors_xml(self):
     actual_xml = """{xml_header}
                         <{root_tag} xmlns="{xmlns}">
                             <{child_tag}
                                 {actual_xml_base}
                             />
                         </{root_tag}>""".format(
         xml_header=self.XML_HEADER,
         xmlns=self.XML_NS,
         root_tag=self.ROOT_TAG,
         child_tag=self.CHILD_TAG,
         actual_xml_base=self.actual_xml_base,
         **self.healthmonitor_attribute_kwargs)
     actual_obj = HealthMonitors.deserialize(actual_xml, 'xml')
     self.assertEqual(self.expected_obj, actual_obj)
Exemplo n.º 4
0
 def test_healthmonitors_xml(self):
     actual_xml = """{xml_header}
                         <{root_tag} xmlns="{xmlns}">
                             <{child_tag}
                                 {actual_xml_base}
                             />
                         </{root_tag}>""".format(
         xml_header=self.XML_HEADER,
         xmlns=self.XML_NS,
         root_tag=self.ROOT_TAG,
         child_tag=self.CHILD_TAG,
         actual_xml_base=self.actual_xml_base,
         **self.healthmonitor_attribute_kwargs)
     actual_obj = HealthMonitors.deserialize(actual_xml, 'xml')
     self.assertEqual(self.expected_obj, actual_obj)