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
This commit is contained in:
parent
444fc6149d
commit
48681af86a
@ -100,6 +100,6 @@ class TestCommandManager(utils.TestCase):
|
||||
mock_pkg_resources,
|
||||
) as iter_entry_points:
|
||||
mgr = commandmanager.CommandManager('test')
|
||||
assert iter_entry_points.called_once_with('test')
|
||||
iter_entry_points.assert_called_once_with('test')
|
||||
cmds = mgr.get_command_names('test')
|
||||
self.assertEqual(['one', 'cmd two'], cmds)
|
||||
|
Loading…
x
Reference in New Issue
Block a user