Exemplo n.º 1
0
 def test_04_Family(self):
     """Read controller family
     """
     l_obj = Utility._read_base_device(self.m_xml.controller, self.m_version)
     Utility._read_controller_data(l_obj, self.m_xml.controller, self.m_version)
     Utility._read_interface_data(l_obj, self.m_xml.controller, self.m_version)
     Utility._read_family_data(self.m_pyhouse_obj, l_obj, self.m_xml.controller, self.m_version)
     self.assertEqual(l_obj.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
     self.assertEqual(l_obj.DevCat, conversions.dotted_hex2int(TESTING_INSTEON_DEVCAT_0))
     self.assertEqual(l_obj.ProductKey, conversions.dotted_hex2int(TESTING_INSTEON_PRODUCT_KEY_0))
     self.assertEqual(l_obj.GroupList, TESTING_INSTEON_GROUP_LIST_0)
     self.assertEqual(l_obj.GroupNumber, int(TESTING_INSTEON_GROUP_NUM_0))
     self.assertEqual(l_obj.Version, int(TESTING_INSTEON_VERSION))
 def test_04_Family(self):
     """Read controller family
     """
     l_xml = self.m_xml.controller
     l_obj = Utility._read_base_device(self.m_pyhouse_obj, l_xml)
     Utility._read_controller_data(self.m_pyhouse_obj, l_obj, l_xml)
     Utility._read_interface_data(self.m_pyhouse_obj, l_obj, l_xml)
     Utility._read_family_data(self.m_pyhouse_obj, l_obj, l_xml)
     self.assertEqual(l_obj.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
     self.assertEqual(l_obj.DevCat, conversions.dotted_hex2int(TESTING_INSTEON_DEVCAT_0))
     self.assertEqual(l_obj.ProductKey, conversions.dotted_hex2int(TESTING_INSTEON_PRODUCT_KEY_0))
     self.assertEqual(l_obj.GroupList, TESTING_INSTEON_GROUP_LIST_0)
     self.assertEqual(l_obj.GroupNumber, int(TESTING_INSTEON_GROUP_NUM_0))