Exemplo n.º 1
0
 def test_02_Import(self):
     self.m_family_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'UPB')
     l_mod = Utility._do_import(self.m_family_obj, 'UPB_xml')
     # print(PrettyFormatAny.form(l_mod, 'B1-02-A - Module'))
     self.assertEqual(self.m_family_obj.Name, 'UPB')
     self.assertEqual(self.m_family_obj.Key, 0)
     self.assertEqual(self.m_family_obj.Active, True)
     self.assertEqual(self.m_family_obj.FamilyDeviceModuleName, 'UPB_device')
     self.assertEqual(self.m_family_obj.FamilyPackageName, 'Modules.Families.UPB')
     self.assertEqual(self.m_family_obj.FamilyXmlModuleName, 'UPB_xml')
Exemplo n.º 2
0
 def _build_house(p_pyhouse_obj):
     l_ret = HouseInformation()
     l_ret.Name = 'Test House'
     l_ret.Location = LocationData()
     #  Added family build 2015-08-19
     l_ret.FamilyData = familyUtil._init_component_apis(p_pyhouse_obj)
     return l_ret
Exemplo n.º 3
0
 def test_06_FamiliesUPB(self):
     l_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'UPB')
     # print(PrettyFormatAny.form(l_obj, 'A1-06-A - UPB'))
     self.assertEqual(l_obj.Name, TESTING_FAMILY_NAME_2)
     self.assertEqual(l_obj.FamilyDeviceModuleName, 'UPB_device')
     self.assertEqual(l_obj.FamilyPackageName, 'Modules.Families.UPB')
     self.assertEqual(l_obj.FamilyXmlModuleName, 'UPB_xml')
Exemplo n.º 4
0
 def test_05_FamiliesInsteon(self):
     l_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'Insteon')
     # print(PrettyFormatAny.form(l_obj, 'A1-05-A- Insteon'))
     self.assertEqual(l_obj.Name, TESTING_FAMILY_NAME_1)
     self.assertEqual(l_obj.FamilyDeviceModuleName, 'Insteon_device')
     self.assertEqual(l_obj.FamilyPackageName, 'Modules.Families.Insteon')
     self.assertEqual(l_obj.FamilyXmlModuleName, 'Insteon_xml')
Exemplo n.º 5
0
 def test_04_FamiliesNull(self):
     l_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'Null')
     # print(PrettyFormatAny.form(l_obj, 'A1-04-A - Null'))
     self.assertEqual(l_obj.Name, TESTING_FAMILY_NAME_0)
     self.assertEqual(l_obj.FamilyDeviceModuleName, 'Null_device')
     self.assertEqual(l_obj.FamilyPackageName, 'Modules.Families.Null')
     self.assertEqual(l_obj.FamilyXmlModuleName, 'Null_xml')
Exemplo n.º 6
0
 def test_07_FamiliesX10(self):
     l_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'X10')
     # print(PrettyFormatAny.form(l_obj, 'A1-07-A - X10'))
     self.assertEqual(l_obj.Name, TESTING_FAMILY_NAME_3)
     self.assertEqual(l_obj.FamilyDeviceModuleName, 'X10_device')
     self.assertEqual(l_obj.FamilyPackageName, 'Modules.Families.X10')
     self.assertEqual(l_obj.FamilyXmlModuleName, 'X10_xml')
Exemplo n.º 7
0
 def test_07_FamiliesX10(self):
     l_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'X10')
     # print(PrettyFormatAny.form(l_obj, 'X10'))
     self.assertEqual(l_obj.Name, 'X10')
     self.assertEqual(l_obj.FamilyDeviceModuleName, 'X10_device')
     self.assertEqual(l_obj.FamilyPackageName, 'Modules.Families.X10')
     self.assertEqual(l_obj.FamilyXmlModuleName, 'X10_xml')
Exemplo n.º 8
0
 def _build_house(p_pyhouse_obj):
     l_ret = HouseInformation()
     l_ret.Name = 'Test House'
     l_ret.Location = LocationData()
     #  Added family build 2015-08-19
     l_ret.FamilyData = familyUtil._init_component_apis(p_pyhouse_obj)
     l_ret.Lighting = LightingData()
     return l_ret
Exemplo n.º 9
0
 def test_01_Import(self):
     l_mod = Utility._do_import(self.m_family_obj, 'Insteon_xml')
     self.assertEqual(self.m_family_obj.Name, 'Insteon')
     self.assertEqual(self.m_family_obj.Key, 0)
     self.assertEqual(self.m_family_obj.Active, True)
     self.assertEqual(self.m_family_obj.FamilyDeviceModuleName, 'Insteon_device')
     self.assertEqual(self.m_family_obj.FamilyPackageName, 'Modules.Families.Insteon')
     self.assertEqual(self.m_family_obj.FamilyXmlModuleName, 'Insteon_xml')
Exemplo n.º 10
0
 def _build_house_data(p_pyhouse_obj):
     l_ret = HouseInformation()
     l_ret.Location = LocationData()
     l_ret.FamilyData = familyUtil._init_component_apis(p_pyhouse_obj)
     l_ret.Entertainment = SetupPyHouseObj._build_entertainment(p_pyhouse_obj)
     l_ret.Lighting = LightingData()
     l_ret.Hvac = HvacData()
     l_ret.Security = SecurityData()
     return l_ret
Exemplo n.º 11
0
 def test_01_Import(self):
     l_mod = Utility._do_import(self.m_family_obj, 'Insteon_xml')
     print(PrettyFormatAny.form(l_mod, 'Module'))
     self.assertEqual(self.m_family_obj.Name, 'Insteon')
     self.assertEqual(self.m_family_obj.Key, 0)
     self.assertEqual(self.m_family_obj.Active, True)
     self.assertEqual(self.m_family_obj.FamilyDeviceModuleName,
                      'Insteon_device')
     self.assertEqual(self.m_family_obj.FamilyPackageName,
                      'Modules.Families.Insteon')
     self.assertEqual(self.m_family_obj.FamilyXmlModuleName, 'Insteon_xml')
Exemplo n.º 12
0
 def setUp(self):
     SetupMixin.setUp(self, ET.fromstring(XML_LONG))
     self.m_family_obj = Utility._build_one_family_data(self.m_pyhouse_obj, 'Insteon')
Exemplo n.º 13
0
 def setUp(self):
     SetupMixin.setUp(self, ET.fromstring(XML_LONG))
     self.m_family_obj = Utility._build_one_family_data(
         self.m_pyhouse_obj, 'Insteon')