Fix incorrect mock usage
test_configure_global_cluster() is using 'has_calls', but that does not exist in the unittest.mock library. Use 'assert_has_calls' as eventually this will cause a test error. Change-Id: Ica1fa7daaf6c90d988805c33352d3e4246af080d
This commit is contained in:
parent
96d86a1acf
commit
2d31e02a37
|
@ -1077,7 +1077,7 @@ class UtilsTestCase(unittest.TestCase):
|
|||
@mock.patch('pcmk.commit')
|
||||
def test_configure_global_cluster(self, mock_commit):
|
||||
utils.configure_cluster_global(240, 120)
|
||||
mock_commit.has_calls([
|
||||
mock_commit.assert_has_calls([
|
||||
mock.call('crm configure property no-quorum-policy=stop'),
|
||||
mock.call('crm configure rsc_defaults $id="rsc-options" '
|
||||
'resource-stickiness="100" failure-timeout=240'),
|
||||
|
|
Loading…
Reference in New Issue