mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-31 04:01:59 +01:00
fix(stats): handle missing plugin argument in StatsApp routing
This commit is contained in:
1 parent
9ce23a77d5
commit
6f9ef1c394
2 files changed
+2
-1
No files matched your search
@@ -395,7 +395,7 @@ class StatsApp:
|
||||
# Application UI plugins: /plugins/{id}/...
|
||||
if args and args[0] == "plugins":
|
||||
if len(args) < 2:
|
||||
raise cherrypy.NotFound()
|
||||
return self.index()
|
||||
plugin_id = args[1]
|
||||
return self._serve_plugin_ui(plugin_id, tuple(args[2:]))
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ def test_stats_app_index_and_default_routing(monkeypatch, tmp_path):
|
||||
app.default("api")
|
||||
|
||||
assert app.default("ws", "packets") == ""
|
||||
assert app.default("plugins") == "<html>ok</html>"
|
||||
assert app.default("route") == "<html>ok</html>"
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user