]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove faulty .assert_has_calls([])
authorJacek Swiderski <jacek.swiderski@codilime.com>
Thu, 11 Sep 2014 13:32:18 +0000 (15:32 +0200)
committerJacek Swiderski <jacek.swiderski@codilime.com>
Thu, 11 Sep 2014 13:32:18 +0000 (15:32 +0200)
commit3b0ac61dea7178e858c6dede44a13818c5162283
treea9c4a45986351349097a7ebb9c2321283ef624f1
parent18caf626b2becfc6884d0b7f1c6546d737d50c5f
Remove faulty .assert_has_calls([])

Some UT use <mock>.assert_has_calls([]) as a way to check if mock
wasn't called - this doesn't work because assert_has_calls only checks
if passed calls are present in mock_calls and hence it is always true
regardless of whether mock was called or not. This can lead to falsely
passed tests.

Change-Id: I1be5327854cc3dc2f5b3733f2bad78200cfbbfd2
Closes-Bug: #1368234
neutron/tests/unit/services/loadbalancer/drivers/radware/test_plugin_driver.py
neutron/tests/unit/test_iptables_firewall.py
neutron/tests/unit/test_linux_interface.py
neutron/tests/unit/test_security_groups_rpc.py