yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #20949
[Bug 1368234] [NEW] faulty way of checking if mock wasn't called
Public bug reported:
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.
** Affects: neutron
Importance: Undecided
Assignee: Jacek Świderski (jacek-swiderski)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Jacek Świderski (jacek-swiderski)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1368234
Title:
faulty way of checking if mock wasn't called
Status in OpenStack Neutron (virtual network service):
New
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1368234/+subscriptions
Follow ups
References