mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-31 04:01:59 +01:00
feat(plugins): add runtime endpoint and functionality to retrieve plugin runtime data
This commit is contained in:
1 parent
6f9ef1c394
commit
6a393c5c61
8 files changed
+123
-3
No files matched your search
@@ -51,6 +51,11 @@ def test_list_and_status_via_client_mock(tmp_path, cherrypy_request):
|
||||
"enabled": True,
|
||||
}
|
||||
mock_client.enable.return_value = {"id": "openhop.demo", "enabled": True, "state": "RUNNING"}
|
||||
mock_client.get_runtime.return_value = {
|
||||
"id": "openhop.demo",
|
||||
"exists": True,
|
||||
"runtime": {"schema": 1, "running": True},
|
||||
}
|
||||
|
||||
with patch.object(api, "_client_or_raise", return_value=mock_client):
|
||||
cherrypy.request.method = "GET"
|
||||
@@ -67,6 +72,11 @@ def test_list_and_status_via_client_mock(tmp_path, cherrypy_request):
|
||||
enabled = api.enable()
|
||||
assert enabled["success"] is True
|
||||
|
||||
cherrypy.request.method = "GET"
|
||||
runtime = api.runtime(id="openhop.demo")
|
||||
assert runtime["success"] is True
|
||||
assert runtime["runtime"]["schema"] == 1
|
||||
|
||||
|
||||
def test_ui_serving_index_assets_spa_and_disabled(tmp_path):
|
||||
plugins_root = tmp_path / "plugins"
|
||||
|
||||
Reference in new issue
Block a user