)]}'
{"nova/tests/unit/conductor/tasks/test_live_migrate.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"812e3fa1c773ff3614761fd8dc243e5751e5064a","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            self.task._check_host_is_up, \"host\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_check_requested_destination(self):"},{"line_number":150,"context_line":"        with test.nested("},{"line_number":151,"context_line":"            mock.patch.object(objects.Service, \u0027get_by_compute_host\u0027),"},{"line_number":152,"context_line":"            mock.patch.object(self.task, \u0027_get_compute_info\u0027),"},{"line_number":153,"context_line":"            mock.patch.object(self.task.servicegroup_api, \u0027service_is_up\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_8b5bc0f5","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":24},"updated":"2016-05-31 11:32:09.000000000","message":"Can you get rid of this and move all mock.patch.objects to decorators? It will increase readability, also we really don\u0027t need to use context manager here.\n\nAnother option is to make nested method and put decorators on a nested method in case you want to mock using actually existing objects (e.g., self.task). And then just call nested method","commit_id":"93fb1f3de30fb525e7811be13de41d6ea4afd711"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"812e3fa1c773ff3614761fd8dc243e5751e5064a","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                          self.task._check_requested_destination)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def test_check_requested_destination_fails_with_not_enough_memory(self):"},{"line_number":194,"context_line":"        with test.nested("},{"line_number":195,"context_line":"            mock.patch.object(self.task, \u0027_check_host_is_up\u0027),"},{"line_number":196,"context_line":"            mock.patch.object(objects.ComputeNode,"},{"line_number":197,"context_line":"                              \u0027get_first_node_by_host_for_old_compat\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_eb740c69","line":194,"updated":"2016-05-31 11:32:09.000000000","message":"ditto","commit_id":"93fb1f3de30fb525e7811be13de41d6ea4afd711"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"812e3fa1c773ff3614761fd8dc243e5751e5064a","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                                                   self.destination)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def test_check_requested_destination_fails_with_hypervisor_diff(self):"},{"line_number":214,"context_line":"        with test.nested("},{"line_number":215,"context_line":"            mock.patch.object(self.task, \u0027_check_host_is_up\u0027),"},{"line_number":216,"context_line":"            mock.patch.object(self.task,"},{"line_number":217,"context_line":"                              \u0027_check_destination_has_enough_memory\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_0b687086","line":214,"updated":"2016-05-31 11:32:09.000000000","message":"ditto","commit_id":"93fb1f3de30fb525e7811be13de41d6ea4afd711"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"812e3fa1c773ff3614761fd8dc243e5751e5064a","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                             mock_get_info.call_args_list)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_check_requested_destination_fails_with_hypervisor_too_old(self):"},{"line_number":233,"context_line":"        with test.nested("},{"line_number":234,"context_line":"            mock.patch.object(self.task, \u0027_check_host_is_up\u0027),"},{"line_number":235,"context_line":"            mock.patch.object(self.task,"},{"line_number":236,"context_line":"                              \u0027_check_destination_has_enough_memory\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_4b0c38ed","line":233,"updated":"2016-05-31 11:32:09.000000000","message":"ditto","commit_id":"93fb1f3de30fb525e7811be13de41d6ea4afd711"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dbf52291cf1892ff4866479d7d766e3303353e12","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                       \u0027check_can_live_migrate_destination\u0027)"},{"line_number":151,"context_line":"    def test_check_requested_destination(self, mock_check, mock_is_up,"},{"line_number":152,"context_line":"                                         mock_get_info, mock_get_host):"},{"line_number":153,"context_line":"        mock_get_host.return_value \u003d \"service\""},{"line_number":154,"context_line":"        mock_is_up.return_value \u003d True"},{"line_number":155,"context_line":"        hypervisor_details \u003d objects.ComputeNode("},{"line_number":156,"context_line":"            hypervisor_type\u003d\"a\","},{"line_number":157,"context_line":"            hypervisor_version\u003d6.1,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_3747b5bc","line":154,"range":{"start_line":153,"start_character":0,"end_line":154,"end_character":38},"updated":"2016-12-13 17:10:00.000000000","message":"nit: I\u0027d prefer these as args to the decorator\n\n    @mock.patch.object(objects.Service, \u0027get_by_compute_host\u0027,\n                       return_value\u003d\u0027service\u0027)","commit_id":"be498977bfe1dc93a6ea050e8ad4d657c5f5c2a8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dbf52291cf1892ff4866479d7d766e3303353e12","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            memory_mb\u003d512,"},{"line_number":160,"context_line":"            ram_allocation_ratio\u003d1.0)"},{"line_number":161,"context_line":"        mock_get_info.return_value \u003d hypervisor_details"},{"line_number":162,"context_line":"        mock_check.return_value \u003d \"migrate_data\""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.task._check_requested_destination()"},{"line_number":165,"context_line":"        self.assertEqual(\"migrate_data\", self.task.migrate_data)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_f7237d03","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":48},"updated":"2016-12-13 17:10:00.000000000","message":"This too","commit_id":"be498977bfe1dc93a6ea050e8ad4d657c5f5c2a8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dbf52291cf1892ff4866479d7d766e3303353e12","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.assertEqual([mock.call(self.destination),"},{"line_number":169,"context_line":"                          mock.call(self.instance_host),"},{"line_number":170,"context_line":"                          mock.call(self.destination)],"},{"line_number":171,"context_line":"                         mock_get_info.call_args_list)"},{"line_number":172,"context_line":"        mock_check.assert_called_once_with(self.context, self.instance,"},{"line_number":173,"context_line":"            self.destination, self.block_migration, self.disk_over_commit)"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_1778f9f1","line":171,"range":{"start_line":171,"start_character":0,"end_line":171,"end_character":54},"updated":"2016-12-13 17:10:00.000000000","message":"nit: this seems like it should be the first argument?","commit_id":"be498977bfe1dc93a6ea050e8ad4d657c5f5c2a8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2b25bf131742a6cfaceb9c75bfb5b0fee42bc82b","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.assertEqual([mock.call(self.destination),"},{"line_number":169,"context_line":"                          mock.call(self.instance_host),"},{"line_number":170,"context_line":"                          mock.call(self.destination)],"},{"line_number":171,"context_line":"                         mock_get_info.call_args_list)"},{"line_number":172,"context_line":"        mock_check.assert_called_once_with(self.context, self.instance,"},{"line_number":173,"context_line":"            self.destination, self.block_migration, self.disk_over_commit)"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_f7cd72b8","line":171,"range":{"start_line":171,"start_character":0,"end_line":171,"end_character":54},"in_reply_to":"1a6eadb0_1778f9f1","updated":"2017-01-18 18:43:46.000000000","message":"I would rather use mock.assert_has_calls, but either way.","commit_id":"be498977bfe1dc93a6ea050e8ad4d657c5f5c2a8"}]}
