Esempio n. 1
0
 def test_03_All(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_in_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = LightingCoreAPI.read_core_lighting_xml(l_device, l_in_xml, self.m_version)
     FamUtil.read_family_data(self.m_pyhouse_obj, l_light, l_in_xml)
     l_out_xml = LightingCoreAPI.write_core_lighting_xml("Light", l_light)
     FamUtil.write_family_data(self.m_pyhouse_obj, l_out_xml, l_light)
     self.assertEqual(l_light.Name, TESTING_LIGHTING_LIGHTS_NAME_1)
     self.assertEqual(l_light.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_light.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 2
0
 def test_01_All(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_in_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = deviceXML.read_base_device_object_xml(self.m_pyhouse_obj, l_device, l_in_xml)
     FamUtil.read_family_data(self.m_pyhouse_obj, l_light, l_in_xml)
     l_out_xml = deviceXML.write_base_device_object_xml('Light', l_light)
     FamUtil.write_family_data(self.m_pyhouse_obj, l_out_xml, l_light)
     self.assertEqual(l_light.Name, TESTING_LIGHT_NAME_0)
     self.assertEqual(l_light.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_light.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 3
0
 def test_06_All(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     #
     l_light = LightingCoreAPI.read_core_lighting_xml(l_device, l_xml, self.m_version)
     FamUtil.read_family_data(self.m_pyhouse_obj, l_light, l_xml)
     self.assertEqual(l_light.Name, TESTING_LIGHTING_LIGHTS_NAME_1)
     self.assertEqual(l_light.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_light.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
     self.assertEqual(l_light.DevCat, conversions.dotted_hex2int(TESTING_INSTEON_DEVCAT_0))
     self.assertEqual(conversions.int2dotted_hex(l_light.ProductKey, 3), TESTING_INSTEON_PRODUCT_KEY_0)
Esempio n. 4
0
 def test_05_All(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     #
     l_light = deviceXML.read_base_device_object_xml(self.m_pyhouse_obj, l_device, l_xml)
     FamUtil.read_family_data(self.m_pyhouse_obj, l_light, l_xml)
     # print(PrettyFormatAny.form(l_light, 'C4-05-A - Light'))
     self.assertEqual(l_light.Name, TESTING_LIGHT_NAME_0)
     self.assertEqual(l_light.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_light.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
     self.assertEqual(l_light.DevCat, conversions.dotted_hex2int(TESTING_INSTEON_DEVCAT_0))
     self.assertEqual(conversions.int2dotted_hex(l_light.ProductKey, 3), TESTING_INSTEON_PRODUCT_KEY_0)
Esempio n. 5
0
 def test_02_All(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_in_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = LightingCoreAPI.read_core_lighting_xml(
         self.m_pyhouse_obj, l_device, l_in_xml)
     FamUtil.read_family_data(self.m_pyhouse_obj, l_light, l_in_xml)
     l_out_xml = LightingCoreAPI.write_core_lighting_xml('Light', l_light)
     FamUtil.write_family_data(self.m_pyhouse_obj, l_out_xml, l_light)
     self.assertEqual(l_light.Name, TESTING_LIGHT_NAME_0)
     self.assertEqual(l_light.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_light.InsteonAddress,
                      conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 6
0
 def _read_family_data(p_pyhouse_obj, p_obj, p_xml):
     """Read the family specific data for this controller.
     """
     # l_debug = debug_tools._format_object('Obj', p_obj, 100)
     # print('Read controller {}'.format(l_debug))
     l_api = FamUtil.read_family_data(p_pyhouse_obj, p_obj, p_xml)
     return l_api  # for testing
Esempio n. 7
0
 def _read_family_data(p_pyhouse_obj, p_obj, p_xml, _p_version):
     """Read the family specific data for this controller.
     """
     # l_debug = debug_tools._format_object('Obj', p_obj, 100)
     # print('Read controller {}'.format(l_debug))
     l_api = FamUtil.read_family_data(p_pyhouse_obj, p_obj, p_xml)
     return l_api  # for testing
Esempio n. 8
0
 def test_03_Family(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = FamUtil.read_family_data(self.m_pyhouse_obj, l_device, l_xml)
     # print(PrettyFormatAny.form(l_light, 'C4-03-A - Light'))
     self.assertEqual(str(l_light.UPBAddress), TESTING_UPB_ADDRESS)
Esempio n. 9
0
 def test_03_Family(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = FamUtil.read_family_data(self.m_pyhouse_obj, l_device, l_xml)
     # print(PrettyFormatAny.form(l_light, 'Light'))
     self.assertEqual(l_light.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 10
0
 def test_05_All(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     #
     l_light = deviceXML.read_base_device_object_xml(l_device, l_xml)
     FamUtil.read_family_data(self.m_pyhouse_obj, l_light, l_xml)
     # print(PrettyFormatAny.form(l_light, 'C4-05-A - Light'))
     self.assertEqual(l_light.Name, TESTING_LIGHT_NAME_0)
     self.assertEqual(l_light.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_light.InsteonAddress,
                      convert.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
     self.assertEqual(l_light.DevCat,
                      convert.dotted_hex2int(TESTING_INSTEON_DEVCAT_0))
     self.assertEqual(convert.int2dotted_hex(l_light.ProductKey, 3),
                      TESTING_INSTEON_PRODUCT_KEY_0)
Esempio n. 11
0
 def test_03_Family(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = FamUtil.read_family_data(self.m_pyhouse_obj, l_device, l_xml)
     # print(PrettyFormatAny.form(l_light, 'C4-03-A - Light'))
     self.assertEqual(str(l_light.UPBAddress), TESTING_UPB_ADDRESS)
Esempio n. 12
0
 def test_03_Family(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light
     l_device = self.m_device_obj
     l_light = FamUtil.read_family_data(self.m_pyhouse_obj, l_device, l_xml)
     print(PrettyFormatAny.form(l_light, 'Light'))
     self.assertEqual(l_light.InsteonAddress,
                      conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 13
0
 def test_01_Family(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light_sect[0]
     print(PrettyFormatAny.form(l_xml, 'C3-01-A - XML'))
     l_device = self.m_device_obj
     l_light = FamUtil.read_family_data(self.m_pyhouse_obj, l_device, l_xml)
     print(PrettyFormatAny.form(l_light, 'C3-01-B - Light'))
     self.assertEqual(l_device.Name, TESTING_LIGHT_NAME_0)
     self.assertEqual(l_light.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 14
0
 def test_01_Family(self):
     """ Did we get everything set up for the rest of the tests of this class.
     """
     l_xml = self.m_xml.light_sect[0]
     print(PrettyFormatAny.form(l_xml, 'C3-01-A - XML'))
     l_device = self.m_device_obj
     l_light = FamUtil.read_family_data(self.m_pyhouse_obj, l_device, l_xml)
     print(PrettyFormatAny.form(l_light, 'C3-01-B - Light'))
     self.assertEqual(l_device.Name, TESTING_LIGHT_NAME_0)
     self.assertEqual(l_light.InsteonAddress,
                      convert.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
Esempio n. 15
0
 def _read_family_data(p_pyhouse_obj, p_obj, p_xml):
     l_ret = FamUtil.read_family_data(p_pyhouse_obj, p_obj, p_xml)
     return l_ret
Esempio n. 16
0
 def _read_family_data(p_pyhouse_obj, p_obj, p_xml):
     l_api = FamUtil.read_family_data(p_pyhouse_obj, p_obj, p_xml)
     return l_api  # for testing
Esempio n. 17
0
 def _read_family_data(p_pyhouse_obj, p_obj, p_xml):
     l_api = FamUtil.read_family_data(p_pyhouse_obj, p_obj, p_xml)
     return l_api  # for testing
Esempio n. 18
0
 def _read_family_data(p_pyhouse_obj, p_obj, p_xml):
     l_ret = FamUtil.read_family_data(p_pyhouse_obj, p_obj, p_xml)
     return l_ret