Skip to content

Commit

Permalink
fixed agent instance creation in tests for service tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
mtitov committed Sep 29, 2023
1 parent 559b3f6 commit 24d21b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/unit_tests/test_agent_0/test_agent_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 = []

Expand Down

0 comments on commit 24d21b9

Please sign in to comment.