)]}'
{"nova/tests/unit/objects/test_instance.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"a9992b691ba60b59b24c11fda649db78e6262259","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            cells_rpcapi.CellsAPI().AndReturn(cells_api_mock)"},{"line_number":335,"context_line":"            cells_api_mock.instance_update_at_top(self.context,"},{"line_number":336,"context_line":"                                                  mox.IsA(objects.Instance))"},{"line_number":337,"context_line":"        notifications.send_update(self.context, mox.IgnoreArg(),"},{"line_number":338,"context_line":"                                  mox.IgnoreArg())"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_ec4ddf3e","side":"PARENT","line":337,"updated":"2016-01-22 13:47:16.000000000","message":"This mock is missing in new version","commit_id":"710f66cd2a8444f84358a0a3e1df3d3646788784"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"b1bbfafa2fa24673ceed38390781c2ed370b576f","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            cells_rpcapi.CellsAPI().AndReturn(cells_api_mock)"},{"line_number":335,"context_line":"            cells_api_mock.instance_update_at_top(self.context,"},{"line_number":336,"context_line":"                                                  mox.IsA(objects.Instance))"},{"line_number":337,"context_line":"        notifications.send_update(self.context, mox.IgnoreArg(),"},{"line_number":338,"context_line":"                                  mox.IgnoreArg())"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_3e3a2bcd","side":"PARENT","line":337,"in_reply_to":"9a68dd71_ec4ddf3e","updated":"2016-01-22 18:21:11.000000000","message":"Oh thanks! Fixed this :)","commit_id":"710f66cd2a8444f84358a0a3e1df3d3646788784"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"a9992b691ba60b59b24c11fda649db78e6262259","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        cells_api_mock \u003d mock.Mock(cells_rpcapi.CellsAPI)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        with test.nested("},{"line_number":310,"context_line":"                mock.patch.object(notifications, \u0027send_update\u0027),"},{"line_number":311,"context_line":"                mock.patch.object(db, \u0027instance_info_cache_update\u0027),"},{"line_number":312,"context_line":"                mock.patch.object(db, \u0027instance_update_and_get_original\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_cc67bbb5","line":309,"updated":"2016-01-22 13:47:16.000000000","message":"Can you nest a method and use mock.patch.object decorators instead of test.nested?","commit_id":"8a58b3ce59d01f9f3de81895e935402d8f2af316"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"b1bbfafa2fa24673ceed38390781c2ed370b576f","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        cells_api_mock \u003d mock.Mock(cells_rpcapi.CellsAPI)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        with test.nested("},{"line_number":310,"context_line":"                mock.patch.object(notifications, \u0027send_update\u0027),"},{"line_number":311,"context_line":"                mock.patch.object(db, \u0027instance_info_cache_update\u0027),"},{"line_number":312,"context_line":"                mock.patch.object(db, \u0027instance_update_and_get_original\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_5ea35f00","line":309,"in_reply_to":"9a68dd71_cc67bbb5","updated":"2016-01-22 18:21:11.000000000","message":"This helper method is being accessed by multiple other tests, so I wasn\u0027t able to figure out how to add the mock arguments *along with* arguments already present (cell_type and save_kwargs), so I did it this way. Also, I found out that there do exist instances of test.nested at multiple places in Nova code, so I think this should be okay.\n\nI\u0027m keeping this as it is, but do let me know if you feel this should be modified.","commit_id":"8a58b3ce59d01f9f3de81895e935402d8f2af316"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"a9992b691ba60b59b24c11fda649db78e6262259","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                mock.patch.object(db, \u0027instance_info_cache_update\u0027),"},{"line_number":312,"context_line":"                mock.patch.object(db, \u0027instance_update_and_get_original\u0027,"},{"line_number":313,"context_line":"                    return_value \u003d (old_ref, new_ref)),"},{"line_number":314,"context_line":"                mock.patch.object(db, \u0027instance_get_by_uuid\u0027, return_value"},{"line_number":315,"context_line":"                    \u003d old_ref),"},{"line_number":316,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_at_top\u0027),"},{"line_number":317,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_from_api\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_cc46db4e","line":314,"range":{"start_line":314,"start_character":60,"end_line":314,"end_character":62},"updated":"2016-01-22 13:47:16.000000000","message":"Can you break line there for better readability?","commit_id":"8a58b3ce59d01f9f3de81895e935402d8f2af316"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"b1bbfafa2fa24673ceed38390781c2ed370b576f","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                mock.patch.object(db, \u0027instance_info_cache_update\u0027),"},{"line_number":312,"context_line":"                mock.patch.object(db, \u0027instance_update_and_get_original\u0027,"},{"line_number":313,"context_line":"                    return_value \u003d (old_ref, new_ref)),"},{"line_number":314,"context_line":"                mock.patch.object(db, \u0027instance_get_by_uuid\u0027, return_value"},{"line_number":315,"context_line":"                    \u003d old_ref),"},{"line_number":316,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_at_top\u0027),"},{"line_number":317,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_from_api\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_3eaf8be3","line":314,"range":{"start_line":314,"start_character":60,"end_line":314,"end_character":62},"in_reply_to":"9a68dd71_cc46db4e","updated":"2016-01-22 18:21:11.000000000","message":"Sure! Done","commit_id":"8a58b3ce59d01f9f3de81895e935402d8f2af316"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"a9992b691ba60b59b24c11fda649db78e6262259","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                    \u003d old_ref),"},{"line_number":316,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_at_top\u0027),"},{"line_number":317,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_from_api\u0027),"},{"line_number":318,"context_line":"                mock.patch.object(cells_rpcapi, \u0027CellsAPI\u0027, return_value \u003d"},{"line_number":319,"context_line":"                    cells_api_mock)"},{"line_number":320,"context_line":"        ) as (mock_send_update, mock_instance_info_cache_update,"},{"line_number":321,"context_line":"                 mock_instance_update_and_get_original,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_0c3ab3cc","line":318,"range":{"start_line":318,"start_character":58,"end_line":318,"end_character":60},"updated":"2016-01-22 13:47:16.000000000","message":"ditto","commit_id":"8a58b3ce59d01f9f3de81895e935402d8f2af316"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"b1bbfafa2fa24673ceed38390781c2ed370b576f","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                    \u003d old_ref),"},{"line_number":316,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_at_top\u0027),"},{"line_number":317,"context_line":"                mock.patch.object(cells_api_mock, \u0027instance_update_from_api\u0027),"},{"line_number":318,"context_line":"                mock.patch.object(cells_rpcapi, \u0027CellsAPI\u0027, return_value \u003d"},{"line_number":319,"context_line":"                    cells_api_mock)"},{"line_number":320,"context_line":"        ) as (mock_send_update, mock_instance_info_cache_update,"},{"line_number":321,"context_line":"                 mock_instance_update_and_get_original,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_feb49335","line":318,"range":{"start_line":318,"start_character":58,"end_line":318,"end_character":60},"in_reply_to":"9a68dd71_0c3ab3cc","updated":"2016-01-22 18:21:11.000000000","message":"done :)","commit_id":"8a58b3ce59d01f9f3de81895e935402d8f2af316"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"af469529175c1f9d05860cd83a0d0146407932ca","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                        mock.ANY)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            mock_send_update.assert_called_with(self.context, mock.ANY,"},{"line_number":373,"context_line":"                mock.ANY)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def test_save(self):"},{"line_number":376,"context_line":"        self._save_test_helper(None, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a5de9d1_92051612","line":373,"updated":"2016-02-01 13:49:08.000000000","message":"The original test uses mox.IsA(objects.Instance) but you\u0027re using mock.ANY which is alot weaker. You should use nova.test.MatchType(type) any time you replace a mox.IsA(type)","commit_id":"e896e84d1823d0cdcdbd30f13e582e0d14f22490"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"a1623e0b6d4b415e990111eff7e4e5bf134d00b0","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                        mock.ANY)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            mock_send_update.assert_called_with(self.context, mock.ANY,"},{"line_number":373,"context_line":"                mock.ANY)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def test_save(self):"},{"line_number":376,"context_line":"        self._save_test_helper(None, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_664ac385","line":373,"in_reply_to":"7a5de9d1_4ec27cea","updated":"2016-02-03 16:52:13.000000000","message":"Hi Daniel, thanks for pointing out a better way. I remember myself thinking if there exist a better alternative than mock.ANY to mox.IsA but couldn\u0027t find out at that time. \n\nHi Ken\u0027ichi, althought mock.ANY makes sense at this instance, there were two different instances in the same file where I was using mock.ANY, where I should\u0027ve used test.MatchType. I\u0027ve fixed both of those instances now. Please review again :)","commit_id":"e896e84d1823d0cdcdbd30f13e582e0d14f22490"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"088166c7aab303232bdd5ea38b827bd1e1a9bb2d","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                        mock.ANY)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            mock_send_update.assert_called_with(self.context, mock.ANY,"},{"line_number":373,"context_line":"                mock.ANY)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def test_save(self):"},{"line_number":376,"context_line":"        self._save_test_helper(None, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a5de9d1_4ec27cea","line":373,"in_reply_to":"7a5de9d1_92051612","updated":"2016-02-01 23:53:08.000000000","message":"Hi Daniel,\n\nThe original test used mox.IgnoreArg(), not mx.IsA() at line 347.\n\nSo mock.ANY doesn\u0027t seem so wrong. Sorry if I miss something.","commit_id":"e896e84d1823d0cdcdbd30f13e582e0d14f22490"}]}
