def test_err_cli_res_to_dict(self): with self.assertRaises(Exception) as exc: navi_handler = NaviHandler(**ACCESS_INFO) navi_handler.cli_res_to_dict({}) self.assertIn('arrange resource info error', str(exc.exception))
def test_cli_res_to_dict(self): navi_handler = NaviHandler(**ACCESS_INFO) agent_re = navi_handler.cli_res_to_dict(AGENT_INFOS) self.assertDictEqual(agent_re, AGENT_RESULT)