From 4e3f65ceef8b3c7321194c3087eb01ca4553bf56 Mon Sep 17 00:00:00 2001 From: Takashi Natsume Date: Fri, 14 May 2021 23:12:14 +0900 Subject: [PATCH] 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 --- neutron/tests/unit/plugins/ml2/test_plugin.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/neutron/tests/unit/plugins/ml2/test_plugin.py b/neutron/tests/unit/plugins/ml2/test_plugin.py index acb5642c750..67d2c721daf 100644 --- a/neutron/tests/unit/plugins/ml2/test_plugin.py +++ b/neutron/tests/unit/plugins/ml2/test_plugin.py @@ -1929,12 +1929,12 @@ class TestMl2PluginOnly(Ml2PluginV2TestCase): host = 'fake-host' plugin = directory.get_plugin() plugin.delete_port_binding(self.context, host, port_id) - 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)) + clear_bl_mock.assert_called_once_with(self.context, + port_id=port_id, + host=host) + delete_port_binding_mock.assert_called_once_with(self.context, + host=host, + port_id=port_id) class Test_GetNetworkMtu(Ml2PluginV2TestCase):