Skip to content

Commit 48681af

Browse files
author
Tang Chen
committed
Don't use Mock.called_once_with that does not exist
Class mock.Mock does not exist method "called_once_with()", it just exists method "assert_called_once_with()". "called_once_with()" does nothing because it's a mock object. In OSC, only one place is still using "called_once_with()". Fix it. Change-Id: Ib890e95d775c3fc43df80fa05c82d726e78cdac8 Partial Bug: 1544522
1 parent 444fc61 commit 48681af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openstackclient/tests/common/test_commandmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ def test_get_command_names(self):
100100
mock_pkg_resources,
101101
) as iter_entry_points:
102102
mgr = commandmanager.CommandManager('test')
103-
assert iter_entry_points.called_once_with('test')
103+
iter_entry_points.assert_called_once_with('test')
104104
cmds = mgr.get_command_names('test')
105105
self.assertEqual(['one', 'cmd two'], cmds)

0 commit comments

Comments
 (0)