diff --git a/apps/backend/tests/subscription/test_performance.py b/apps/backend/tests/subscription/test_performance.py index 67ffbc442a..e17ee8ebc6 100644 --- a/apps/backend/tests/subscription/test_performance.py +++ b/apps/backend/tests/subscription/test_performance.py @@ -215,7 +215,7 @@ class TestPerformance(TestCase): @classmethod def mock_get_instance_by_scope(cls, instance_num): - def get_instances_by_scope(scope, *args, **kwargs): + def get_instances_by_scope(scope, data_backend, *args, **kwargs): if scope["nodes"]: mocked_instances = {} for i in range(instance_num): diff --git a/apps/node_man/tests/test_handlers/test_policy.py b/apps/node_man/tests/test_handlers/test_policy.py index 3b4cc443c1..67be9d04f3 100644 --- a/apps/node_man/tests/test_handlers/test_policy.py +++ b/apps/node_man/tests/test_handlers/test_policy.py @@ -35,7 +35,7 @@ from apps.utils.unittest.testcase import CustomBaseTestCase -def get_instances_by_scope(scope, **kwargs): +def get_instances_by_scope(scope, data_backend, **kwargs): host_id = scope["nodes"][0]["bk_host_id"] host = Host.objects.filter(bk_host_id=host_id) instance_key = f"host|instance|host|{host_id}"