def test_04_Web(self): """ Read all Web info. """ self.m_pyhouse_obj.Computer.Web = webXml.read_web_xml(self.m_pyhouse_obj) l_obj = webXml.read_web_xml(self.m_pyhouse_obj) print(PrettyFormatAny.form(l_obj, 'All Web')) self.assertEqual(l_obj.WebPort, int(TESTING_WEB_PORT)) self.assertEqual(len(l_obj.Logins), 2)
def test_04_Web(self): """ Read all Web info. """ self.m_pyhouse_obj.Computer.Web = webXml.read_web_xml( self.m_pyhouse_obj) l_obj = webXml.read_web_xml(self.m_pyhouse_obj) print(PrettyFormatAny.form(l_obj, 'All Web')) self.assertEqual(l_obj.WebPort, int(TESTING_WEB_PORT)) self.assertEqual(len(l_obj.Logins), 2)
def test_02_ReadXML(self): l_web = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Web = l_web # print(PrettyFormatAny.form(l_web, 'Web Data')) self.assertEqual(l_web.WebPort, 8580) self.assertEqual(len(l_web.Logins), 2) self.assertEqual(l_web.Logins[0].Name, TESTING_LOGIN_NAME_0)
def setUp(self): SetupMixin.setUp(self, ET.fromstring(XML_LONG)) l_web = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Web = l_web l_nodes = nodesXml.read_all_nodes_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Nodes = l_nodes self.m_worksapce = WorkspaceData self.m_worksapce.m_pyhouse_obj = self.m_pyhouse_obj
def LoadXml(self, p_pyhouse_obj): """ Load the Mqtt xml info. """ l_ret = webXml.read_web_xml(p_pyhouse_obj) p_pyhouse_obj.Computer.Web = l_ret LOG.info('Loaded XML')
def test_03_WriteXML(self): l_web = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Web = l_web print(PrettyFormatAny.form(l_web, 'Web Data')) l_xml = webXml.write_web_xml(l_web) print(PrettyFormatAny.form(l_xml, 'XML'))
def LoadXml(self, p_pyhouse_obj): l_ret = webXml.read_web_xml(p_pyhouse_obj) return l_ret
def test_21_WriteXML(self): l_web = webXml.read_web_xml(self.m_pyhouse_obj) l_xml = webXml.write_web_xml(l_web)
def test_11_ReadXML(self): l_web = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Logs = l_web self.assertEqual(l_web.WebPort, 8580)
def test_21_WriteXML(self): l_web = webXml.read_web_xml(self.m_pyhouse_obj) l_xml = webXml.write_web_xml(l_web)
def test_11_ReadXML(self): l_web = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Logs = l_web self.assertEqual(l_web.WebPort, 8580)
def setUp(self): SetupMixin.setUp(self, ET.fromstring(XML_LONG)) self.m_web_obj = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Web = self.m_web_obj self.m_web_xml = ET.Element("WebSection")
def setUp(self): SetupMixin.setUp(self, ET.fromstring(XML_LONG)) self.m_web_obj = webXml.read_web_xml(self.m_pyhouse_obj) self.m_pyhouse_obj.Computer.Web = self.m_web_obj self.m_web_xml = ET.Element("WebSection")