)]}'
{"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2e0be5e290e0fd54dcfd7cebb45cc8787957c0c0","unresolved":true,"context_lines":[{"line_number":1103,"context_line":"            uuids.cn_uuid1: objects.ComputeNode("},{"line_number":1104,"context_line":"                uuid\u003duuids.cn_uuid1, hypervisor_hostname\u003d\u0027node1\u0027,"},{"line_number":1105,"context_line":"                host\u003dself.compute.host)}"},{"line_number":1106,"context_line":"        self.compute.driver \u003d mock.Mock()"},{"line_number":1107,"context_line":"        mock_insts \u003d mock.Mock(return_value\u003d[])"},{"line_number":1108,"context_line":"        mock_init_host \u003d mock.Mock()"},{"line_number":1109,"context_line":"        self.compute.driver.attach_mock(mock_insts, \"list_instance_uuids\")"},{"line_number":1110,"context_line":"        self.compute.driver.attach_mock(mock_init_host, \"init_host\")"},{"line_number":1111,"context_line":"        self.compute.init_host(None)"},{"line_number":1112,"context_line":""},{"line_number":1113,"context_line":"        mock_error_interrupted.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":1,"id":"4b752c68_96d02189","line":1110,"range":{"start_line":1106,"start_character":0,"end_line":1110,"end_character":68},"updated":"2025-11-17 15:31:10.000000000","message":"This is fine but if im not mistaken you can also do this\n\n\n```suggestion\n        self.compute.driver \u003d mock.Mock()\n        self.compute.driver.list_instance_uuids.return_value \u003d []\n        self.compute.driver.init_host \u003d mock.Mock()\n```\n`i don\u0027t think  self.compute.driver.init_host \u003d mock.Mock() is even technically`\nrequired because you create the driver as a mock without a spec.\n\nwith that said i am fine with being more explicit and using attach mock\ni just don\u0027t think its required.\n\nsemanticly its the same either way.","commit_id":"38495b8adaa5b01ea226ff1917eadb85a6875bc0"}]}
