示例#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)
 def test_03_Interface(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)
     print(PrettyFormatAny.form(l_xml, 'C1-03-A - w/ Interface', 100))
     self.assertEqual(l_xml.find('BaudRate').text, TESTING_SERIAL_BAUD_RATE)
     self.assertEqual(l_xml.find('ByteSize').text, TESTING_SERIAL_BYTE_SIZE)
     self.assertEqual(l_xml.find('Parity').text, TESTING_SERIAL_PARITY)
     self.assertEqual(l_xml.find('RtsCts').text, TESTING_SERIAL_RTS_CTS)
     self.assertEqual(l_xml.find('StopBits').text, TESTING_SERIAL_STOP_BITS)
     self.assertEqual(l_xml.find('Timeout').text, TESTING_SERIAL_TIMEOUT)
     self.assertEqual(l_xml.find('XonXoff').text, TESTING_SERIAL_XON_XOFF)
示例#4
0
 def test_03_Interface(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)
     #  print(PrettyFormatAny.form(l_controllers[0], 'Obj Controllers', 100))
     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)
     #  print(PrettyFormatAny.form(l_xml, 'AllControllers', 100))
     self.assertEqual(l_xml.find('BaudRate').text, TESTING_SERIAL_BAUD_RATE)
     self.assertEqual(l_xml.find('ByteSize').text, TESTING_SERIAL_BYTE_SIZE)
     self.assertEqual(l_xml.find('Parity').text, TESTING_SERIAL_PARITY)
     self.assertEqual(l_xml.find('RtsCts').text, TESTING_SERIAL_RTS_CTS)
     self.assertEqual(l_xml.find('StopBits').text, TESTING_SERIAL_STOP_BITS)
     self.assertEqual(l_xml.find('Timeout').text, TESTING_SERIAL_TIMEOUT)
     self.assertEqual(l_xml.find('XonXoff').text, TESTING_SERIAL_XON_XOFF)