Fix batch test

This commit is contained in:
Daniel A. Wozniak 2023-07-04 00:38:19 -07:00 committed by Gareth J. Greenaway
parent f556db26a9
commit 0ede71eda5

View file

@ -64,7 +64,7 @@ class MockSubscriber:
def __init__(self, *args, **kwargs):
return
def read(self, timeout=None):
def recv(self, timeout=None):
"""
Mock IPCMessageSubcriber read method.
@ -170,7 +170,7 @@ def test_batch_issue_56273():
"extension_modules": "",
"failhard": True,
}
with patch("salt.transport.ipc.IPCMessageSubscriber", MockSubscriber):
with patch("salt.transport.tcp.TCPPubClient", MockSubscriber):
batch = salt.cli.batch.Batch(opts, quiet=True)
with patch.object(batch.local, "pub", Mock(side_effect=mock_pub)):
with patch.object(