yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #86089
[Bug 1928471] Re: Wrong assertion methods in unit test
Reviewed: https://review.opendev.org/c/openstack/neutron/+/791497
Committed: https://opendev.org/openstack/neutron/commit/4e3f65ceef8b3c7321194c3087eb01ca4553bf56
Submitter: "Zuul (22348)"
Branch: master
commit 4e3f65ceef8b3c7321194c3087eb01ca4553bf56
Author: Takashi Natsume <takanattie@xxxxxxxxx>
Date: Fri May 14 23:12:14 2021 +0900
Fix wrong assertion methods in a unit test
Fix wrong assertion methods in the
test_delete_port_binding_delete_binding_and_levels method in
neutron.tests.unit.plugins.ml2.test_plugin.TestMl2PluginOnly.
Change-Id: Ib9c5f9ba660484df6048238375bc31f624228677
Closes-Bug: 1928471
Signed-off-by: Takashi Natsume <takanattie@xxxxxxxxx>
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1928471
Title:
Wrong assertion methods in unit test
Status in neutron:
Fix Released
Bug description:
The following test code is not appropriate. The
'assert_called_once_with' method should be used.
self.assertTrue(clear_bl_mock.called_with(self.context,
port_id=port_id,
host=host))
self.assertTrue(delete_port_binding_mock.called_with(self.context,
host=host,
port_id=port_id))
See https://opendev.org/openstack/neutron/src/commit/92fa8ce6af42db5b88f640137d823a11c5a44a2c/neutron/tests/unit/plugins/ml2/test_plugin.py#L1932-L1937 (master)
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1928471/+subscriptions
References