63465640fe
Python 3.12 has removed long-deprecated unittest features [1], therefore some of the existing unit test fail when run on Python 3.12. This patch replaces the 'assertEquals' with 'assertTrue' or 'assertFalse', depending on the usage. This patch also fixes the 'test_amqp_changed' and 'test_amqp_departed' test methods which improperly called 'called_with' which is no longer a valid assertion method [2]. And in fact on Python < 3.12 the 'test_amqp_changed' and 'test_amqp_departed' pass their assertions, when they actually should fail due to the out-of-sync with 'amqp-relation-changed' and 'amqp-relation-departed' hook code. In this case the 'called_with' is replaced with 'assert_called_once'. [1] https://docs.python.org/3.12/whatsnew/3.12.html#id3 [2] https://github.com/python/cpython/issues/100690 Change-Id: I90b400f6bafe8f03f04f991d9fe58635d19b8b2e Signed-off-by: Marcin Wilk <marcin.wilk@canonical.com> |
||
---|---|---|
.. | ||
__init__.py | ||
16.07-dpdk-openvswitch-switch | ||
16.10-openvswitch-switch | ||
package-provided-openvswitch-switch | ||
pci_responses.py | ||
test_actions_cleanup.py | ||
test_neutron_ovs_context.py | ||
test_neutron_ovs_hooks.py | ||
test_neutron_ovs_utils.py | ||
test_os_actions.py | ||
test_pci_helper.py | ||
test_pci.py | ||
test_utils.py |