From b1c930d41f4390da2f33e91e613f70cbd3730a58 Mon Sep 17 00:00:00 2001 From: James Page Date: Tue, 23 Jan 2024 14:30:54 +0000 Subject: [PATCH] tests: correct use of has_calls -> assert_has_calls Newer Python detect 'has_calls' as an incorrect use of assert_has_calls. Correct the one instance of this in Octavia. Change-Id: I5c943266332908e00c19b409e3af571680d55c26 --- .../unit/controller/worker/v2/tasks/test_database_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octavia/tests/unit/controller/worker/v2/tasks/test_database_tasks.py b/octavia/tests/unit/controller/worker/v2/tasks/test_database_tasks.py index 13472e08f7..48000554e4 100644 --- a/octavia/tests/unit/controller/worker/v2/tasks/test_database_tasks.py +++ b/octavia/tests/unit/controller/worker/v2/tasks/test_database_tasks.py @@ -1424,7 +1424,7 @@ class TestDatabaseTasks(base.TestCase): provisioning_status=constants.ERROR) ]) self.assertEqual(2, repo.HealthMonitorRepository.update.call_count) - repo.HealthMonitorRepository.update.has_calls( + repo.HealthMonitorRepository.update.assert_has_calls( [mock.call(mock_session, health_monitor.id, provisioning_status=constants.ERROR)]) self.assertEqual(1, repo.L7PolicyRepository.update.call_count)