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:
Brian Haley 2023-11-01 17:41:56 -04:00
parent 96d86a1acf
commit 2d31e02a37
1 changed files with 1 additions and 1 deletions

View File

@ -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'),