From ff273909da631566919392a07e1e758609476c54 Mon Sep 17 00:00:00 2001 From: Takashi Natsume Date: Mon, 12 Sep 2022 21:21:49 +0900 Subject: [PATCH] Fix wrong assertion methods Change-Id: Iebf4840662e87e59a06b56f1b5248728cba03c24 Story: 2010288 Task: 46261 Signed-off-by: Takashi Natsume --- openstackclient/tests/unit/compute/v2/test_server.py | 2 +- openstackclient/tests/unit/image/v2/test_image.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py index d393acdaf1..138ac345df 100644 --- a/openstackclient/tests/unit/compute/v2/test_server.py +++ b/openstackclient/tests/unit/compute/v2/test_server.py @@ -4634,7 +4634,7 @@ class TestServerList(_TestServerList): parsed_args = self.check_parser(self.cmd, arglist, verifylist) columns, data = self.cmd.take_action(parsed_args) - self.flavors_mock.get.has_calls(self.flavor.id) + self.flavors_mock.get.assert_has_calls([mock.call(self.flavor.id)]) self.search_opts['flavor'] = self.flavor.id self.servers_mock.list.assert_called_with(**self.kwargs) diff --git a/openstackclient/tests/unit/image/v2/test_image.py b/openstackclient/tests/unit/image/v2/test_image.py index 02f7b4118f..f2c113649c 100644 --- a/openstackclient/tests/unit/image/v2/test_image.py +++ b/openstackclient/tests/unit/image/v2/test_image.py @@ -1090,7 +1090,7 @@ class TestImageSet(TestImage): self.assertIsNone(result) # we'll have called this but not set anything - self.app.client_manager.image.update_image.called_once_with( + self.app.client_manager.image.update_image.assert_called_once_with( self._image.id, )