Skip to content

Commit 9fbbdf7

Browse files
cephadm: fix invalid use of mock called_with method
Fixes `AttributeError: 'called_with' is not a valid assertion` errors that appear when running the unit tests with python3.12. Part of an effort to get ceph tox environments passing on Python 3.12. Signed-off-by: John Mulligan <[email protected]>
1 parent d9acf69 commit 9fbbdf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cephadm/tests/test_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def recv(self, len: Optional[int] = None):
668668
agent.mgr_listener.run()
669669

670670
# verify payload was correctly extracted
671-
assert _handle_json_payload.called_with(json.loads(payload))
671+
_handle_json_payload.assert_called_with(json.loads(payload))
672672
FakeConn.send.assert_called_once_with(b'ACK')
673673

674674
# second run, with bad json data received

0 commit comments

Comments
 (0)