Exemplo n.º 1
0
 def test_04_Family(self):
     """ Write out the XML file for the location section
     """
     l_controllers = self.m_api.read_all_controllers_xml(self.m_pyhouse_obj, self.m_xml.controller_sect, self.m_version)
     l_xml = Utility._write_base_device(l_controllers[0])
     Utility._write_controller_data(l_controllers[0], l_xml)
     Utility._write_interface_data(l_controllers[0], l_xml)
     Utility._write_family_data(self.m_pyhouse_obj, l_controllers[0], l_xml)
     #  print(PrettyFormatAny.form(l_xml, 'AllControllers', 100))
     self.assertEqual(l_xml.find('Address').text, TESTING_INSTEON_ADDRESS_0)
     self.assertEqual(l_xml.find('DevCat').text, TESTING_INSTEON_DEVCAT_0)
     self.assertEqual(l_xml.find('GroupList').text, TESTING_INSTEON_GROUP_LIST_0)
     self.assertEqual(l_xml.find('GroupNumber').text, TESTING_INSTEON_GROUP_NUM_0)
 def test_04_Family(self):
     """ Write out the XML file for the location section
     """
     l_controllers = self.m_api.read_all_controllers_xml(self.m_pyhouse_obj)
     l_xml = Utility._write_base_device(l_controllers[0])
     Utility._write_controller_data(l_controllers[0], l_xml)
     Utility._write_interface_data(l_controllers[0], l_xml)
     Utility._write_family_data(self.m_pyhouse_obj, l_controllers[0], l_xml)
     print(PrettyFormatAny.form(l_xml, 'w/ Family', 100))
     self.assertEqual(l_xml.find('InsteonAddress').text, TESTING_INSTEON_ADDRESS_0)
     self.assertEqual(l_xml.find('DevCat').text, TESTING_INSTEON_DEVCAT_0)
     self.assertEqual(l_xml.find('GroupList').text, TESTING_INSTEON_GROUP_LIST_0)
     self.assertEqual(l_xml.find('GroupNumber').text, TESTING_INSTEON_GROUP_NUM_0)