refactor: change test folder structure, rename functions to account for (non)changing behaviours and clarity
ref: N25B-257
This commit is contained in:
@@ -34,7 +34,7 @@ async def test_setup_bind(zmq_context, mocker):
|
||||
fake_socket.setsockopt.assert_any_call(zmq.SUBSCRIBE, b"command")
|
||||
|
||||
# Ensure behaviour attached
|
||||
assert any(isinstance(b, agent.SendCommandsBehaviour) for b in agent.behaviours)
|
||||
assert any(isinstance(b, agent.SendZMQCommandsBehaviour) for b in agent.behaviours)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -66,7 +66,7 @@ async def test_send_commands_behaviour_valid_message():
|
||||
agent.subsocket = fake_socket
|
||||
agent.pubsocket = fake_socket
|
||||
|
||||
behaviour = agent.SendCommandsBehaviour()
|
||||
behaviour = agent.SendZMQCommandsBehaviour()
|
||||
behaviour.agent = agent
|
||||
|
||||
with patch(
|
||||
@@ -92,7 +92,7 @@ async def test_send_commands_behaviour_invalid_message(caplog):
|
||||
agent.subsocket = fake_socket
|
||||
agent.pubsocket = fake_socket
|
||||
|
||||
behaviour = agent.SendCommandsBehaviour()
|
||||
behaviour = agent.SendZMQCommandsBehaviour()
|
||||
behaviour.agent = agent
|
||||
|
||||
await behaviour.run()
|
||||
Reference in New Issue
Block a user