]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: change tests to assert using mock call not func.args
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 1 Jun 2023 15:16:13 +0000 (11:16 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 15 Jun 2023 20:35:34 +0000 (16:35 -0400)
commit0a882a736c957ff2f638aa3bb113ae1f8074ef65
tree24b1090562f2cacfb1264bca1c63129a27c45b9e
parent8d0f8be96cd28a29a0d4f067119a4652805b15ba
cephadm: change tests to assert using mock call not func.args

The Python docs [1] note that:
  Changed in version 3.8: Added args and kwargs properties.

In order to run tests on python 3.6 (example: `tox -e py36`) we
change the tests to do the asserts using the older call(...)
comparison style, with mock.ANY used for args we don't care about.

[1] - https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.call_args

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/tests/test_util_funcs.py