MCPcopy Create free account
hub / github.com/Tong89/smartNode / TestGetStats

Class TestGetStats

tests/test_core.py:341–362  ·  view source on GitHub ↗

get_stats 返回结构完整性。

Source from the content-addressed store, hash-verified

339
340
341class TestGetStats:
342 """get_stats 返回结构完整性。"""
343
344 def test_returns_dict(self):
345 eng = _make_engine()
346 assert isinstance(eng.get_stats(), dict)
347
348 def test_contains_total_requests(self):
349 eng = _make_engine()
350 assert "total_requests" in eng.get_stats()
351
352 def test_contains_accepted_and_rejected(self):
353 eng = _make_engine()
354 stats = eng.get_stats()
355 assert "accepted_requests" in stats
356 assert "rejected_requests" in stats
357
358 def test_resource_utilization_is_dict(self):
359 eng = _make_engine()
360 stats = eng.get_stats()
361 ru = stats.get("resource_utilization", None)
362 assert isinstance(ru, dict)
363
364
365# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected