From 24d21b9f3c1f816bc9fadd0bc4d5cd75e9685cd5 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Fri, 29 Sep 2023 11:05:36 -0400 Subject: [PATCH] fixed agent instance creation in tests for service tasks --- tests/unit_tests/test_agent_0/test_agent_0.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/test_agent_0/test_agent_0.py b/tests/unit_tests/test_agent_0/test_agent_0.py index 8e35b1a7a3..50e0ac13e5 100755 --- a/tests/unit_tests/test_agent_0/test_agent_0.py +++ b/tests/unit_tests/test_agent_0/test_agent_0.py @@ -190,7 +190,8 @@ def local_advance(things, publish, push): nonlocal advanced_services advanced_services = things - agent_0 = Agent_0(ru.Config(), self._session) + agent_0 = Agent_0() + agent_0._session = self._session agent_0.advance = local_advance agent_0._log = mock.Mock() agent_0._service_uids_launched = list() @@ -235,7 +236,9 @@ def local_advance(things, publish, push): @mock.patch.object(Agent_0, '__init__', return_value=None) def test_ctrl_service_up(self, mocked_init): - agent_0 = Agent_0(ru.Config(), self._session) + agent_0 = Agent_0() + agent_0._cfg = ru.Config() + agent_0._session = self._session agent_0._service_uids_launched = ['101', '102'] agent_0._service_uids_running = []