__wrapped_mock_method__ = <function NonCallableMock.assert_called_once_with at 0x7f9cfa633ea0>
args = (<MagicMock id='140312163634480'>, {'else': ['value2']}), kwargs = {}
__tracebackhide__ = True
msg = "Expected 'mock' to be called once. Called 0 times."
__mock_self = <MagicMock id='140312163634480'>
def assert_wrapper(
__wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any
) -> None:
__tracebackhide__ = True
try:
> __wrapped_mock_method__(*args, **kwargs)
.tox/py3/lib/python3.7/site-packages/pytest_mock/plugin.py:414:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_mock_self = <MagicMock id='140312163634480'>, args = ({'else': ['value2']},)
kwargs = {}, self = <MagicMock id='140312163634480'>
msg = "Expected 'mock' to be called once. Called 0 times."
def assert_called_once_with(_mock_self, *args, **kwargs):
"""assert that the mock was called exactly once and that that call was
with the specified arguments."""
self = _mock_self
if not self.call_count == 1:
msg = ("Expected '%s' to be called once. Called %s times." %
(self._mock_name or 'mock', self.call_count))
> raise AssertionError(msg)
E AssertionError: Expected 'mock' to be called once. Called 0 times.
/usr/lib/python3.7/unittest/mock.py:839: AssertionError
During handling of the above exception, another exception occurred:
kafka_producer = <cimpl.Producer object at 0x7f9cf8b447c8>
kafka_prefix = 'zdastehvpw', kafka_server_base = '127.0.0.1:40859'
def test_client_subscribe_one_topic(
kafka_producer: Producer, kafka_prefix: str, kafka_server_base: str
):
client = JournalClient(
brokers=[kafka_server_base],
group_id="whatever",
prefix=kafka_prefix,
stop_on_eof=True,
object_types=["else"],
)
assert client.subscription == [f"{kafka_prefix}.else"]
worker_fn = MagicMock()
client.process(worker_fn)
> worker_fn.assert_called_once_with({"else": ["value2"]})
E AssertionError: Expected 'mock' to be called once. Called 0 times.
.tox/py3/lib/python3.7/site-packages/swh/journal/tests/test_client.py:229: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Apr 8 2022, 11:50 AM