)]}'
{"neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"237152410d7531f3040c40f892bfecac0cc2a724","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                          arg_list\u003darg_list,"},{"line_number":921,"context_line":"                          **{portbindings.HOST_ID: HOST1}):"},{"line_number":922,"context_line":"            l3_notifier \u003d mock.Mock()"},{"line_number":923,"context_line":"            self.l3_plugin.l3_rpc_notifier \u003d l3_notifier"},{"line_number":924,"context_line":"            self.l3_plugin.agent_notifiers["},{"line_number":925,"context_line":"                    constants.AGENT_TYPE_L3] \u003d l3_notifier"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_3538e1ee","side":"PARENT","line":923,"updated":"2016-02-06 17:29:45.000000000","message":"The scope of the mock is identical before and after your change. Mocks are cleaned up at the end of a test run (https://github.com/openstack/neutron/blob/master/neutron/tests/base.py#L150). You could argue that your approach is safer because if someone adds some code after the with block, l3_plugin.l3_rpc_notifier would not be mocked. I\u0027m not sure that matters.","commit_id":"1efa5f1da7cb9bf2087f861ac33f38b358a50748"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"237152410d7531f3040c40f892bfecac0cc2a724","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                          arg_list\u003darg_list,"},{"line_number":921,"context_line":"                          **{portbindings.HOST_ID: HOST1}),\\"},{"line_number":922,"context_line":"                mock.patch.object(self.l3_plugin,"},{"line_number":923,"context_line":"                                  \"_l3_rpc_notifier\") as l3_notifier:"},{"line_number":924,"context_line":"            self.l3_plugin.agent_notifiers["},{"line_number":925,"context_line":"                    constants.AGENT_TYPE_L3] \u003d l3_notifier"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_752ad991","line":923,"updated":"2016-02-06 17:29:45.000000000","message":"The old code was mocking l3_rpc_notifier (Without an underscore), is this intended?","commit_id":"81fa1730bfc83e8a37a42009300e6d0176173bbb"}]}
