test: make some BDI tests work again

ref: N25B-301
This commit is contained in:
Twirre Meulenbelt
2025-11-20 18:03:39 +01:00
parent 0493d390e3
commit c9186eaf8f
5 changed files with 160 additions and 290 deletions

View File

@@ -22,7 +22,12 @@ def pytest_configure(config):
mock_spade.behaviour.CyclicBehaviour = type("CyclicBehaviour", (object,), {})
mock_spade_bdi.bdi.BDIAgent = type("BDIAgent", (object,), {})
# Ensure submodule imports like `agentspeak.runtime` succeed
mock_agentspeak.runtime = MagicMock()
mock_agentspeak.stdlib = MagicMock()
sys.modules["agentspeak"] = mock_agentspeak
sys.modules["agentspeak.runtime"] = mock_agentspeak.runtime
sys.modules["agentspeak.stdlib"] = mock_agentspeak.stdlib
sys.modules["httpx"] = mock_httpx
sys.modules["pydantic"] = mock_pydantic
sys.modules["spade"] = mock_spade