MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / test_ver

Method test_ver

mod/project/node/nodeutil/one_panel_api.py:230–241  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

228 return res["data"], ""
229
230 def test_ver(self) -> bool:
231 self.ver = "v2"
232 self._call_err = None
233 res_data = self.list_file_test()
234 if res_data is None and isinstance(self._call_err, json.JSONDecodeError):
235 self.ver = "v1"
236 res_data = self.list_file_test()
237 if isinstance(res_data, dict):
238 return True
239 elif isinstance(res_data, dict):
240 return True
241 return False
242
243 def system_status(self):
244 endpoint = "/api/{}/dashboard/current".format(self.ver)

Callers 2

check_api_keyMethod · 0.95
test_connMethod · 0.80

Calls 1

list_file_testMethod · 0.95

Tested by

no test coverage detected