)]}'
{"dragonflow/tests/unit/test_l3_proactive_app.py":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"966ae644cc75a09f36fb8adea7ca8fc682adcdf3","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.router.get_ports()[0].get_mac(),"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_add_del_port(self):"},{"line_number":87,"context_line":"        # add local port"},{"line_number":88,"context_line":"        self.mock_mod_flow.reset_mock()"},{"line_number":89,"context_line":"        self.controller.update_lport(test_app_base.fake_local_port1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_eb81e990","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":25},"updated":"2017-02-20 12:47:24.000000000","message":"I think it is better to split it into 4 individual test case.","commit_id":"3aa8f684157f7e9ac8a88a202e1d5ee689fc2ed1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"ccd6e4a14b7970e1563d6656cebdd3899d64944f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.router.get_ports()[0].get_mac(),"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_add_del_port(self):"},{"line_number":87,"context_line":"        # add local port"},{"line_number":88,"context_line":"        self.mock_mod_flow.reset_mock()"},{"line_number":89,"context_line":"        self.controller.update_lport(test_app_base.fake_local_port1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_32499f60","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":25},"in_reply_to":"da36d5c6_5c5e2aea","updated":"2017-02-21 03:04:59.000000000","message":"Done","commit_id":"3aa8f684157f7e9ac8a88a202e1d5ee689fc2ed1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"47b813e68351d109545747ba149a9d7cefd7d947","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.router.get_ports()[0].get_mac(),"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_add_del_port(self):"},{"line_number":87,"context_line":"        # add local port"},{"line_number":88,"context_line":"        self.mock_mod_flow.reset_mock()"},{"line_number":89,"context_line":"        self.controller.update_lport(test_app_base.fake_local_port1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_5c5e2aea","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":25},"in_reply_to":"da36d5c6_eb81e990","updated":"2017-02-21 00:59:18.000000000","message":"+1","commit_id":"3aa8f684157f7e9ac8a88a202e1d5ee689fc2ed1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"47b813e68351d109545747ba149a9d7cefd7d947","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # add local port"},{"line_number":88,"context_line":"        self.mock_mod_flow.reset_mock()"},{"line_number":89,"context_line":"        self.controller.update_lport(test_app_base.fake_local_port1)"},{"line_number":90,"context_line":"        self.assertEqual(1, self.mock_mod_flow.call_count)"},{"line_number":91,"context_line":"        args, kwargs \u003d self.mock_mod_flow.call_args"},{"line_number":92,"context_line":"        self.assertEqual(const.L3_PROACTIVE_LOOKUP_TABLE, kwargs[\u0027table_id\u0027])"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_7c0a0ed4","line":90,"range":{"start_line":90,"start_character":0,"end_line":90,"end_character":58},"updated":"2017-02-21 00:59:18.000000000","message":"Instead of assert the call count of mod_flow, which is hard to understand and maintain, I would recommend assert the call of method. In this case, the method will be _add_port_process in l3_proactive_app. It will be more intuitive.","commit_id":"3aa8f684157f7e9ac8a88a202e1d5ee689fc2ed1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"ccd6e4a14b7970e1563d6656cebdd3899d64944f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # add local port"},{"line_number":88,"context_line":"        self.mock_mod_flow.reset_mock()"},{"line_number":89,"context_line":"        self.controller.update_lport(test_app_base.fake_local_port1)"},{"line_number":90,"context_line":"        self.assertEqual(1, self.mock_mod_flow.call_count)"},{"line_number":91,"context_line":"        args, kwargs \u003d self.mock_mod_flow.call_args"},{"line_number":92,"context_line":"        self.assertEqual(const.L3_PROACTIVE_LOOKUP_TABLE, kwargs[\u0027table_id\u0027])"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_5274539b","line":90,"range":{"start_line":90,"start_character":0,"end_line":90,"end_character":58},"in_reply_to":"da36d5c6_7c0a0ed4","updated":"2017-02-21 03:04:59.000000000","message":"Done","commit_id":"3aa8f684157f7e9ac8a88a202e1d5ee689fc2ed1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ca8463e5c53da9bc16f18a56fdd7cf31e4895f50","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def test_add_remote_port(self):"},{"line_number":130,"context_line":"        # add remote port"},{"line_number":131,"context_line":"        with mock.patch(\u0027dragonflow.controller.l3_proactive_app.\u0027"},{"line_number":132,"context_line":"                        \u0027L3ProactiveApp._add_port_process\u0027"},{"line_number":133,"context_line":"                        ) as fake_add_port_process:"},{"line_number":134,"context_line":"            remote_port \u003d test_app_base.fake_remote_port1"},{"line_number":135,"context_line":"            self.controller.update_lport(remote_port)"},{"line_number":136,"context_line":"            fake_add_port_process.assert_called_once_with("},{"line_number":137,"context_line":"                remote_port.get_ip(),"},{"line_number":138,"context_line":"                remote_port.get_mac(),"},{"line_number":139,"context_line":"                remote_port.get_external_value(\u0027local_network_id\u0027),"},{"line_number":140,"context_line":"                remote_port.get_unique_key()"},{"line_number":141,"context_line":"            )"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_remove_remote_port(self):"},{"line_number":144,"context_line":"        remote_port \u003d test_app_base.fake_remote_port1"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_407159a7","line":141,"range":{"start_line":131,"start_character":0,"end_line":141,"end_character":13},"updated":"2017-02-24 01:23:52.000000000","message":"Maybe write a helper method for these code to eliminate the duplication with line 102~112.","commit_id":"f457ffce356c77692e468a057acfb356ad5dba55"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ca8463e5c53da9bc16f18a56fdd7cf31e4895f50","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            )"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_remove_remote_port(self):"},{"line_number":144,"context_line":"        remote_port \u003d test_app_base.fake_remote_port1"},{"line_number":145,"context_line":"        # add remote port"},{"line_number":146,"context_line":"        self.controller.update_lport(remote_port)"},{"line_number":147,"context_line":"        # del remote port"},{"line_number":148,"context_line":"        with mock.patch(\u0027dragonflow.controller.l3_proactive_app.\u0027"},{"line_number":149,"context_line":"                        \u0027L3ProactiveApp._remove_port_process\u0027"},{"line_number":150,"context_line":"                        ) as fake_remove_port_process:"},{"line_number":151,"context_line":"            self.controller.delete_lport(remote_port.get_id())"},{"line_number":152,"context_line":"            fake_remove_port_process.assert_called_once_with("},{"line_number":153,"context_line":"                remote_port.get_ip(),"},{"line_number":154,"context_line":"                remote_port.get_external_value(\u0027local_network_id\u0027),"},{"line_number":155,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_606addb4","line":155,"range":{"start_line":144,"start_character":0,"end_line":155,"end_character":13},"updated":"2017-02-24 01:23:52.000000000","message":"same comment here.","commit_id":"f457ffce356c77692e468a057acfb356ad5dba55"}]}
