)]}'
{"nova/tests/unit/compute/test_tracker.py":[{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"41a12e95fed71b4e677b7cb8416e03daf45d37b4","unresolved":false,"context_lines":[{"line_number":805,"context_line":""},{"line_number":806,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":807,"context_line":"    @mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":808,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":809,"context_line":"    def test_no_op_init_compute_node(self, get_mock, service_mock,"},{"line_number":810,"context_line":"                                     create_mock):"},{"line_number":811,"context_line":"        self._setup_rt()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_246b8a86","line":808,"updated":"2015-07-16 11:13:51.000000000","message":"whoops, rebase error - there was a ComputeNode.create in there, not two get_by_host_and_nodename","commit_id":"877f4db1af262a3610877762bac151ff0ee43766"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"38e5cc75ebd89e33d57da4c660cb9f80ff35fa5b","unresolved":false,"context_lines":[{"line_number":804,"context_line":"class TestInitComputeNode(BaseTestCase):"},{"line_number":805,"context_line":""},{"line_number":806,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.create\u0027)"},{"line_number":807,"context_line":"    @mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":808,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":809,"context_line":"    def test_no_op_init_compute_node(self, get_mock, service_mock,"},{"line_number":810,"context_line":"                                     create_mock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_7467eeea","line":807,"updated":"2015-07-16 15:42:32.000000000","message":"This doesn\u0027t make any sense. If these objects weren\u0027t mocked before, this patch doesn\u0027t suddenly need them to be. Indeed, I pulled this patch down and removed these two new object mocks and everything still passes. Presumably this is because they weren\u0027t called before, you\u0027re asserting that they\u0027re still not called.\n\nThis test could probably use some robustification, but at a minimum, please don\u0027t add these unused mocks in this patch to remove conductor as they\u0027re clearly unrelated.","commit_id":"665dd4ba5181eb3aad8b04e3a933031dc0f1daa9"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"665c79c3a20afb7a105e7a1cea8450a976e71816","unresolved":false,"context_lines":[{"line_number":804,"context_line":"class TestInitComputeNode(BaseTestCase):"},{"line_number":805,"context_line":""},{"line_number":806,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.create\u0027)"},{"line_number":807,"context_line":"    @mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":808,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":809,"context_line":"    def test_no_op_init_compute_node(self, get_mock, service_mock,"},{"line_number":810,"context_line":"                                     create_mock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_ab3d14bd","line":807,"in_reply_to":"9a41bdd9_7467eeea","updated":"2015-07-16 16:21:27.000000000","message":"There are three options for where _init_compute_node gets the compute node object we are working on:\n1. use the one we already have\n2. load an existing one from the database\n3. create a new one\n\nThe three tests look for each of these cases. The way we check 1. is to make sure we didn\u0027t load and we didn\u0027t create. So we are using the mocks in the sense that we make sure they don\u0027t get called.\n\nYou are right to say that it works without them, but that is because the code is correct. If it was wrong and it created a compute node when it shouldn\u0027t the test would pass if these mocks were not there.","commit_id":"665dd4ba5181eb3aad8b04e3a933031dc0f1daa9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"38e5cc75ebd89e33d57da4c660cb9f80ff35fa5b","unresolved":false,"context_lines":[{"line_number":833,"context_line":"        self.assertTrue(self.rt.disabled)"},{"line_number":834,"context_line":"        self.assertIsNone(self.rt.compute_node)"},{"line_number":835,"context_line":""},{"line_number":836,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.create\u0027)"},{"line_number":837,"context_line":"    @mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":838,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":839,"context_line":"    def test_compute_node_loaded(self, get_mock, service_mock, create_mock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_f499bed1","line":836,"updated":"2015-07-16 15:42:32.000000000","message":"Same for this one.","commit_id":"665dd4ba5181eb3aad8b04e3a933031dc0f1daa9"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"665c79c3a20afb7a105e7a1cea8450a976e71816","unresolved":false,"context_lines":[{"line_number":833,"context_line":"        self.assertTrue(self.rt.disabled)"},{"line_number":834,"context_line":"        self.assertIsNone(self.rt.compute_node)"},{"line_number":835,"context_line":""},{"line_number":836,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.create\u0027)"},{"line_number":837,"context_line":"    @mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":838,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":839,"context_line":"    def test_compute_node_loaded(self, get_mock, service_mock, create_mock):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_8bdcd075","line":836,"in_reply_to":"9a41bdd9_f499bed1","updated":"2015-07-16 16:21:27.000000000","message":"Same as above, in this case the test checks that a compute node object is loaded and no attempt is made to create it.","commit_id":"665dd4ba5181eb3aad8b04e3a933031dc0f1daa9"}]}
