示例#1
0
 def test_01_ReadButtonData(self):
     """ Read in the xml file and fill in the lights
     """
     l_button = Utility._read_base_device(self.m_xml.button, self.m_version)
     self.assertEqual(l_button.Name, TESTING_LIGHTING_BUTTON_NAME_1)
     self.assertEqual(l_button.Active, True)
     self.assertEqual(l_button.Comment, TESTING_DEVICE_COMMENT)
     self.assertEqual(l_button.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_button.LightingType, "Button", "Bad Lighting Type")
     self.assertEqual(l_button.RoomName, TESTING_DEVICE_ROOM_NAME)
示例#2
0
 def test_01_ReadButtonData(self):
     """ Read in the xml file and fill in the lights
     """
     l_button = Utility._read_base_device(self.m_xml.button, self.m_version)
     self.assertEqual(l_button.Name, TESTING_LIGHTING_BUTTON_NAME_0)
     self.assertEqual(l_button.Active, True)
     self.assertEqual(l_button.Comment, TESTING_DEVICE_COMMENT)
     self.assertEqual(l_button.DeviceFamily, TESTING_DEVICE_FAMILY_INSTEON)
     self.assertEqual(l_button.LightingType, 'Button', 'Bad Lighting Type')
     self.assertEqual(l_button.RoomName, TESTING_DEVICE_ROOM_NAME)
示例#3
0
 def test_02_ReadOneButtonXml(self):
     """ Read in the xml file and fill in the lights
     """
     l_button = Utility._read_one_button_xml(self.m_pyhouse_obj, self.m_xml.button, self.m_version)
     self.assertEqual(l_button.Name, TESTING_LIGHTING_BUTTON_NAME_1)
     self.assertEqual(l_button.Active, True)
     self.assertEqual(l_button.Key, 0, "Bad key")
     self.assertEqual(l_button.Name, TESTING_LIGHTING_BUTTON_NAME_1)
     self.assertEqual(l_button.DeviceFamily, "Insteon", "Bad Lighting family")
     self.assertEqual(l_button.LightingType, "Button", "Bad LightingType")
     self.assertEqual(l_button.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
示例#4
0
 def test_02_ReadOneButtonXml(self):
     """ Read in the xml file and fill in the lights
     """
     l_button = Utility._read_one_button_xml(self.m_pyhouse_obj, self.m_xml.button, self.m_version)
     self.assertEqual(l_button.Name, TESTING_LIGHTING_BUTTON_NAME_0)
     self.assertEqual(l_button.Active, True)
     self.assertEqual(l_button.Key, 0, 'Bad key')
     self.assertEqual(l_button.Name, TESTING_LIGHTING_BUTTON_NAME_0)
     self.assertEqual(l_button.DeviceFamily, 'Insteon', 'Bad Lighting family')
     self.assertEqual(l_button.LightingType, 'Button', 'Bad LightingType')
     self.assertEqual(l_button.InsteonAddress, conversions.dotted_hex2int(TESTING_INSTEON_ADDRESS_0))
示例#5
0
 def test_01_OneButton(self):
     """ Write out the XML file for the button section
     """
     l_button = Utility._read_one_button_xml(self.m_pyhouse_obj, self.m_xml.button, self.m_version)
     l_xml = Utility._write_one_button_xml(self.m_pyhouse_obj, l_button)
示例#6
0
 def test_01_OneButton(self):
     """ Write out the XML file for the button section
     """
     l_button = Utility._read_one_button_xml(self.m_pyhouse_obj, self.m_xml.button, self.m_version)
     l_xml = Utility._write_one_button_xml(self.m_pyhouse_obj, l_button)