)]}'
{"dragonflow/tests/unit/test_df_local_controller.py":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"53f24c566c0090e4266640649e150ac41c3b0cc5","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from dragonflow.controller import df_local_controller"},{"line_number":19,"context_line":"from dragonflow.controller import ryu_base_app"},{"line_number":20,"context_line":"# from dragonflow.controller import topology"},{"line_number":21,"context_line":"from dragonflow.db import api_nb"},{"line_number":22,"context_line":"from dragonflow.db import db_store"},{"line_number":23,"context_line":"from dragonflow.ovsdb import vswitch_impl as vswitch_api"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_4dde5440","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":43},"updated":"2016-10-24 09:15:40.000000000","message":"remove it if it is not used.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from dragonflow.controller import df_local_controller"},{"line_number":19,"context_line":"from dragonflow.controller import ryu_base_app"},{"line_number":20,"context_line":"# from dragonflow.controller import topology"},{"line_number":21,"context_line":"from dragonflow.db import api_nb"},{"line_number":22,"context_line":"from dragonflow.db import db_store"},{"line_number":23,"context_line":"from dragonflow.ovsdb import vswitch_impl as vswitch_api"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_7d5f33e5","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":43},"in_reply_to":"da6895a0_4dde5440","updated":"2016-10-25 07:54:15.000000000","message":"this is a WIP i commented this out to pass pep8, see commented out code below","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7377fdcd70b8cdf0362765be2590f0244c2b1754","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from dragonflow.tests import base as test_base"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DfLocalControllerTestCase(test_base.BaseTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    controller \u003d df_local_controller.DfLocalController(\u0027foobar\u0027)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_27b78687","line":27,"range":{"start_line":27,"start_character":32,"end_line":27,"end_character":54},"updated":"2016-10-24 02:23:11.000000000","message":"I would suggest using test_app_base.DFAppTestBase, it already fake many part, and provides lots of mock objects.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7377fdcd70b8cdf0362765be2590f0244c2b1754","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DfLocalControllerTestCase(test_base.BaseTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    controller \u003d df_local_controller.DfLocalController(\u0027foobar\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":32,"context_line":"        all_chassis \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_e7bcae6e","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":14},"updated":"2016-10-24 02:23:11.000000000","message":"You are using a class attribute here, which will be shared by all test cases in this test class. This is not good, as the stale information from last test case might influence current test case. And when this happens, it will make problem debug very difficult.\n\nYou could create new DfLocalController in setUp method to avoid this issue. If you use test_app_base.DFAppTestBase, it has already done that for you.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d319c9cbf1ad50e4d1176b81e1a229c9c90967b3","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DfLocalControllerTestCase(test_base.BaseTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    controller \u003d df_local_controller.DfLocalController(\u0027foobar\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":32,"context_line":"        all_chassis \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_e32ac22b","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":14},"in_reply_to":"da6895a0_d02be292","updated":"2016-10-25 09:19:57.000000000","message":"df-controller currently can\u0027t run without app(should it? I doubt that). So if you just use test_app_base, you will see the error you paste. You could use a trick, to add any app. The app is not related to the test, but it should workaround the issue. For me, I added the ml2_app at here.\n\nhttps://review.openstack.org/#/c/385349/3/dragonflow/tests/unit/test_topology.py@24","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"3625094469bb9f9abc02f23ad7011c0b063ecc9c","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DfLocalControllerTestCase(test_base.BaseTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    controller \u003d df_local_controller.DfLocalController(\u0027foobar\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":32,"context_line":"        all_chassis \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_d02be292","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":14},"in_reply_to":"da6895a0_e7bcae6e","updated":"2016-10-24 07:49:51.000000000","message":"Nice, thank you for the early comments. We originally put this in the setUp and ran into issues... Thanks for the help :)\n\nI made the changes you suggested and every setUp call fails with the same error. Here is the captured traceback for the first fail: http://paste.openstack.org/show/586867/ do you know if this issue is related to my change? I don\u0027t think so. It says there is a missing attribute \u0027\\n\u0027 and that does not make much sense.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"e20cf1c2f9a8637c2a927d9e96e7340a42e425b1","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    @mock.patch.object(vswitch_api.OvsApi, \u0027add_tunnel_port\u0027)"},{"line_number":63,"context_line":"    @mock.patch.object(vswitch_api.OvsApi, \u0027get_tunnel_ports\u0027)"},{"line_number":64,"context_line":"    def test_chassis_created(self, mock_get_ports, mock_add):"},{"line_number":65,"context_line":"        # test self.chassis_name \u003d\u003d chassis.get_id()"},{"line_number":66,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":67,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":68,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_129d5459","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":52},"updated":"2016-10-24 14:14:03.000000000","message":"Should this be removed?","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"e20cf1c2f9a8637c2a927d9e96e7340a42e425b1","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":67,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":68,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":69,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":70,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":71,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":72,"context_line":"        ids \u003d [port_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_35140243","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":72},"updated":"2016-10-24 14:14:03.000000000","message":"What is this assert testing?","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":67,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":68,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":69,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":70,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":71,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":72,"context_line":"        ids \u003d [port_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_dde11f00","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":72},"in_reply_to":"da6895a0_35140243","updated":"2016-10-25 07:54:15.000000000","message":"In the case that the chassis passed in has the same id as the controller chassis_name the function should return early with None.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"e20cf1c2f9a8637c2a927d9e96e7340a42e425b1","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":68,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":69,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":70,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":71,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":72,"context_line":"        ids \u003d [port_id]"},{"line_number":73,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_72ae9086","line":70,"range":{"start_line":70,"start_character":8,"end_line":70,"end_character":58},"updated":"2016-10-24 14:14:03.000000000","message":"Should this be removed?","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":68,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":69,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":70,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":71,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":72,"context_line":"        ids \u003d [port_id]"},{"line_number":73,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_1d1d570f","line":70,"range":{"start_line":70,"start_character":8,"end_line":70,"end_character":58},"in_reply_to":"da6895a0_72ae9086","updated":"2016-10-25 07:54:15.000000000","message":"comment indicating the branch the following code was trying to catch. Will be removed after the tests are done.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"e20cf1c2f9a8637c2a927d9e96e7340a42e425b1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ids \u003d [port_id]"},{"line_number":73,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":74,"context_line":"        mock_get_ports.return_value \u003d self._get_mock_ports(ids)"},{"line_number":75,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":76,"context_line":"        # normal execution"},{"line_number":77,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":78,"context_line":"        mock_get_ports.return_value \u003d self._get_mock_ports(ids)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_95194e7c","line":75,"range":{"start_line":75,"start_character":8,"end_line":75,"end_character":72},"updated":"2016-10-24 14:14:03.000000000","message":"What is this assert testing?","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"e20cf1c2f9a8637c2a927d9e96e7340a42e425b1","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                                                     new_secgroup)"},{"line_number":146,"context_line":"        mock_add.assert_called_once_with(new_secgroup, new_rules[1])"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _check_removed_index():"},{"line_number":149,"context_line":"            old_rules[1]"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.assertRaises(IndexError, _check_removed_index)"},{"line_number":152,"context_line":"        mock_delete.assert_called_once_with(old_secgroup, \u0027old_rule\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_f29f0001","line":151,"range":{"start_line":148,"start_character":8,"end_line":151,"end_character":59},"updated":"2016-10-24 14:14:03.000000000","message":"Would this be simpler as an assertion that the length of old_rules is reduced?","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"a64f1a3fe459cd71c42a5c4e512b74fa03a6bc97","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                                                     new_secgroup)"},{"line_number":146,"context_line":"        mock_add.assert_called_once_with(new_secgroup, new_rules[1])"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _check_removed_index():"},{"line_number":149,"context_line":"            old_rules[1]"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.assertRaises(IndexError, _check_removed_index)"},{"line_number":152,"context_line":"        mock_delete.assert_called_once_with(old_secgroup, \u0027old_rule\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_9dbec7d2","line":151,"range":{"start_line":148,"start_character":8,"end_line":151,"end_character":59},"in_reply_to":"da6895a0_1d6f1793","updated":"2016-10-25 07:56:10.000000000","message":"i think i should use assertNotIn ;)","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                                                     new_secgroup)"},{"line_number":146,"context_line":"        mock_add.assert_called_once_with(new_secgroup, new_rules[1])"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _check_removed_index():"},{"line_number":149,"context_line":"            old_rules[1]"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.assertRaises(IndexError, _check_removed_index)"},{"line_number":152,"context_line":"        mock_delete.assert_called_once_with(old_secgroup, \u0027old_rule\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_1d6f1793","line":151,"range":{"start_line":148,"start_character":8,"end_line":151,"end_character":59},"in_reply_to":"da6895a0_f29f0001","updated":"2016-10-25 07:54:15.000000000","message":"here I am specifically checking that the \u0027old_rule\u0027 value is removed, not just any value.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"e20cf1c2f9a8637c2a927d9e96e7340a42e425b1","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":190,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"},{"line_number":191,"context_line":"        mock_get_lport.return_value \u003d None"},{"line_number":192,"context_line":"        self.assertIsNone(self.controller.floatingip_updated(fip))"},{"line_number":193,"context_line":"        mock_get_lport.assert_called_once_with(lport_id)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        mock_get_fip.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_327898c4","line":192,"range":{"start_line":192,"start_character":8,"end_line":192,"end_character":66},"updated":"2016-10-24 14:14:03.000000000","message":"What is this testing?  The function never returns anything but \"None\".  Same question for all instances below.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":190,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"},{"line_number":191,"context_line":"        mock_get_lport.return_value \u003d None"},{"line_number":192,"context_line":"        self.assertIsNone(self.controller.floatingip_updated(fip))"},{"line_number":193,"context_line":"        mock_get_lport.assert_called_once_with(lport_id)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        mock_get_fip.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_bd10eb02","line":192,"range":{"start_line":192,"start_character":8,"end_line":192,"end_character":66},"in_reply_to":"da6895a0_327898c4","updated":"2016-10-25 07:54:15.000000000","message":"yeah I was just asserting the return value of the function. For example, if the return statement is modified to return something that is not None, this is not desired output so this test will fail it.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"53f24c566c0090e4266640649e150ac41c3b0cc5","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        self.controller.floatingip_deleted(fip_id)"},{"line_number":226,"context_line":"        mock_notify.assert_called_once_with(fip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    #def _get_mock_publisher(self, uri, publisher_id):"},{"line_number":229,"context_line":"    #    publisher \u003d mock.Mock()"},{"line_number":230,"context_line":"    #    publisher.get_uri \u003d mock.Mock()"},{"line_number":231,"context_line":"    #    publisher.get_uri.return_value \u003d uri"},{"line_number":232,"context_line":"    #    publisher.get_id \u003d mock.Mock()"},{"line_number":233,"context_line":"    #    publisher.get_id.return_value \u003d publisher_id"},{"line_number":234,"context_line":"    #    return publisher"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    #@mock.patch.object(zmq_pubsub_driver.ZMQSubscriberAgentBase,"},{"line_number":237,"context_line":"    #                   \u0027register_listen_address\u0027)"},{"line_number":238,"context_line":"    #@mock.patch.object(db_store.DbStore, \u0027update_publisher\u0027)"},{"line_number":239,"context_line":"    #def test_publisher_updated(self, mock_update, mock_subscriber):"},{"line_number":240,"context_line":"    #    uri \u003d \u0027fake_uri\u0027"},{"line_number":241,"context_line":"    #    publisher_id \u003d \u0027fake_publisher_id\u0027"},{"line_number":242,"context_line":"    #    publisher \u003d self._get_mock_publisher(uri, publisher_id)"},{"line_number":243,"context_line":"    #    self.controller.publisher_updated(publisher)"},{"line_number":244,"context_line":"    #    mock_update.assert_called_once_with(publisher_id, publisher)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    #def test_publisher_deleted(self):"},{"line_number":247,"context_line":"    #    pass"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":250,"context_line":"                       \u0027notify_associate_floatingip\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_ade37004","line":247,"range":{"start_line":228,"start_character":3,"end_line":247,"end_character":13},"updated":"2016-10-24 09:15:40.000000000","message":"ditto.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        self.controller.floatingip_deleted(fip_id)"},{"line_number":226,"context_line":"        mock_notify.assert_called_once_with(fip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    #def _get_mock_publisher(self, uri, publisher_id):"},{"line_number":229,"context_line":"    #    publisher \u003d mock.Mock()"},{"line_number":230,"context_line":"    #    publisher.get_uri \u003d mock.Mock()"},{"line_number":231,"context_line":"    #    publisher.get_uri.return_value \u003d uri"},{"line_number":232,"context_line":"    #    publisher.get_id \u003d mock.Mock()"},{"line_number":233,"context_line":"    #    publisher.get_id.return_value \u003d publisher_id"},{"line_number":234,"context_line":"    #    return publisher"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    #@mock.patch.object(zmq_pubsub_driver.ZMQSubscriberAgentBase,"},{"line_number":237,"context_line":"    #                   \u0027register_listen_address\u0027)"},{"line_number":238,"context_line":"    #@mock.patch.object(db_store.DbStore, \u0027update_publisher\u0027)"},{"line_number":239,"context_line":"    #def test_publisher_updated(self, mock_update, mock_subscriber):"},{"line_number":240,"context_line":"    #    uri \u003d \u0027fake_uri\u0027"},{"line_number":241,"context_line":"    #    publisher_id \u003d \u0027fake_publisher_id\u0027"},{"line_number":242,"context_line":"    #    publisher \u003d self._get_mock_publisher(uri, publisher_id)"},{"line_number":243,"context_line":"    #    self.controller.publisher_updated(publisher)"},{"line_number":244,"context_line":"    #    mock_update.assert_called_once_with(publisher_id, publisher)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    #def test_publisher_deleted(self):"},{"line_number":247,"context_line":"    #    pass"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":250,"context_line":"                       \u0027notify_associate_floatingip\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_3d05bbbb","line":247,"range":{"start_line":228,"start_character":3,"end_line":247,"end_character":13},"in_reply_to":"da6895a0_ade37004","updated":"2016-10-25 07:54:15.000000000","message":"this is a wip. I could not debug the errors, can you provide a suggestion to implement this?","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"53f24c566c0090e4266640649e150ac41c3b0cc5","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        mock_disassoc.called_once_with(old_fip)"},{"line_number":284,"context_line":"        mock_assoc.called_once_with(new_fip)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    #@mock.patch.object(topology.Topology, \u0027ovs_port_deleted\u0027)"},{"line_number":287,"context_line":"    #@mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":288,"context_line":"    #                   \u0027notify_ovs_port_deleted\u0027)"},{"line_number":289,"context_line":"    #def test_ovs_port_deleted(self, mock_notify, mock_delete):"},{"line_number":290,"context_line":"    #    ovs_port \u003d self._get_mock_ports(\u0027fake_port_id\u0027)[0]"},{"line_number":291,"context_line":"    #    self.controller.ovs_port_deleted(ovs_port)"},{"line_number":292,"context_line":"    #    mock_notify.assert_called_once_with(ovs_port)"},{"line_number":293,"context_line":"    #    mock_delete.assert_called_once_with(ovs_port)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":296,"context_line":"                       \u0027notify_ovs_sync_finished\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_6de158fe","line":293,"range":{"start_line":286,"start_character":4,"end_line":293,"end_character":54},"updated":"2016-10-24 09:15:40.000000000","message":"ditto.","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"39af9ebeeb342b1a2a2ce12963c0bee2d10cfab0","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        mock_disassoc.called_once_with(old_fip)"},{"line_number":284,"context_line":"        mock_assoc.called_once_with(new_fip)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    #@mock.patch.object(topology.Topology, \u0027ovs_port_deleted\u0027)"},{"line_number":287,"context_line":"    #@mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":288,"context_line":"    #                   \u0027notify_ovs_port_deleted\u0027)"},{"line_number":289,"context_line":"    #def test_ovs_port_deleted(self, mock_notify, mock_delete):"},{"line_number":290,"context_line":"    #    ovs_port \u003d self._get_mock_ports(\u0027fake_port_id\u0027)[0]"},{"line_number":291,"context_line":"    #    self.controller.ovs_port_deleted(ovs_port)"},{"line_number":292,"context_line":"    #    mock_notify.assert_called_once_with(ovs_port)"},{"line_number":293,"context_line":"    #    mock_delete.assert_called_once_with(ovs_port)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":296,"context_line":"                       \u0027notify_ovs_sync_finished\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_5d00afaa","line":293,"range":{"start_line":286,"start_character":4,"end_line":293,"end_character":54},"in_reply_to":"da6895a0_6de158fe","updated":"2016-10-25 07:54:15.000000000","message":"ditto","commit_id":"16c36414b4afcaab11dca655d30ba68866711f1c"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"ad90a4c7b529405d5e025e0eacd431b0c913f90f","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                                     new_secgroup)"},{"line_number":159,"context_line":"        mock_add.assert_called_once_with(new_secgroup, new_rules[1])"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        def _check_removed_index():"},{"line_number":162,"context_line":"            old_rules[1]"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.assertRaises(IndexError, _check_removed_index)"},{"line_number":165,"context_line":"        mock_delete.assert_called_once_with(old_secgroup, \u0027old_rule\u0027)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_4d73924d","line":164,"range":{"start_line":161,"start_character":8,"end_line":164,"end_character":59},"updated":"2016-10-31 19:28:55.000000000","message":"This seems like a very strange and roundabout way to check that the correct element was removed from old_roles.  Maybe replace with an assertion that the value you wanted removed is not contained in the array?","commit_id":"454800ed4d083c7dfb267d85078f4d6a04ef6f3c"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"820e8a69c8964ff2ddee8855c0434f8a4e348433","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                                     new_secgroup)"},{"line_number":159,"context_line":"        mock_add.assert_called_once_with(new_secgroup, new_rules[1])"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        def _check_removed_index():"},{"line_number":162,"context_line":"            old_rules[1]"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.assertRaises(IndexError, _check_removed_index)"},{"line_number":165,"context_line":"        mock_delete.assert_called_once_with(old_secgroup, \u0027old_rule\u0027)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_cd02426f","line":164,"range":{"start_line":161,"start_character":8,"end_line":164,"end_character":59},"in_reply_to":"ba5da102_4d73924d","updated":"2016-10-31 19:33:59.000000000","message":"Yes this should be: self.assertNotIn(\u0027old_rule\u0027, old_rules)\n\nSee for usage: https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertNotIn","commit_id":"454800ed4d083c7dfb267d85078f4d6a04ef6f3c"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"27049c091e8a6e5880b8f583a0c2e0a0ad464232","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                                     new_secgroup)"},{"line_number":159,"context_line":"        mock_add.assert_called_once_with(new_secgroup, new_rules[1])"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        def _check_removed_index():"},{"line_number":162,"context_line":"            old_rules[1]"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.assertRaises(IndexError, _check_removed_index)"},{"line_number":165,"context_line":"        mock_delete.assert_called_once_with(old_secgroup, \u0027old_rule\u0027)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_883038a0","line":164,"range":{"start_line":161,"start_character":8,"end_line":164,"end_character":59},"in_reply_to":"ba5da102_cd02426f","updated":"2016-10-31 20:10:45.000000000","message":"Done","commit_id":"454800ed4d083c7dfb267d85078f4d6a04ef6f3c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    apps_list \u003d \"l2_ml2_app.L2App\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(DfLocalControllerTestCase, self).setUp()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":33,"context_line":"        all_chassis \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_abc5ec8e","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":54},"updated":"2016-11-01 09:07:18.000000000","message":"If you do nothing special in the setUp, then you can remove these code, and let the python to call super.setUp implicitly.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    apps_list \u003d \"l2_ml2_app.L2App\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(DfLocalControllerTestCase, self).setUp()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":33,"context_line":"        all_chassis \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_70d38204","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":54},"in_reply_to":"ba5da102_abc5ec8e","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def test_chassis_deleted(self):"},{"line_number":51,"context_line":"        # Creating a list of ports to be returned for get_tunnel_ports"},{"line_number":52,"context_line":"        # Creating the get_chassis_id calls for the ports"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        chassis_id \u003d \u00271234\u0027"},{"line_number":55,"context_line":"        not_chassis_id \u003d \u00275678\u0027"},{"line_number":56,"context_line":"        ids \u003d [chassis_id, not_chassis_id]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_eb5604d1","line":53,"updated":"2016-11-01 09:07:18.000000000","message":"extra empty line","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def test_chassis_deleted(self):"},{"line_number":51,"context_line":"        # Creating a list of ports to be returned for get_tunnel_ports"},{"line_number":52,"context_line":"        # Creating the get_chassis_id calls for the ports"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        chassis_id \u003d \u00271234\u0027"},{"line_number":55,"context_line":"        not_chassis_id \u003d \u00275678\u0027"},{"line_number":56,"context_line":"        ids \u003d [chassis_id, not_chassis_id]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_b0d99a24","line":53,"in_reply_to":"ba5da102_eb5604d1","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        chassis_id \u003d \u00271234\u0027"},{"line_number":55,"context_line":"        not_chassis_id \u003d \u00275678\u0027"},{"line_number":56,"context_line":"        ids \u003d [chassis_id, not_chassis_id]"},{"line_number":57,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":58,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":59,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_2b063cce","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":49},"updated":"2016-11-01 09:07:18.000000000","message":"This has already been done in super class","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        chassis_id \u003d \u00271234\u0027"},{"line_number":55,"context_line":"        not_chassis_id \u003d \u00275678\u0027"},{"line_number":56,"context_line":"        ids \u003d [chassis_id, not_chassis_id]"},{"line_number":57,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":58,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":59,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_d01b6ec8","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":49},"in_reply_to":"ba5da102_2b063cce","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.controller.chassis_deleted(ids[0])"},{"line_number":63,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.assert_called_once()"},{"line_number":64,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":65,"context_line":"                mock_ports[0])"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_chassis_created(self):"},{"line_number":68,"context_line":"        # test self.chassis_name \u003d\u003d chassis.get_id()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_ab216c4f","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":16},"updated":"2016-11-01 09:07:18.000000000","message":"the indention should be 4 spaces","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.controller.chassis_deleted(ids[0])"},{"line_number":63,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.assert_called_once()"},{"line_number":64,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":65,"context_line":"                mock_ports[0])"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_chassis_created(self):"},{"line_number":68,"context_line":"        # test self.chassis_name \u003d\u003d chassis.get_id()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_f07a32f0","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":16},"in_reply_to":"ba5da102_ab216c4f","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":70,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":71,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":72,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":73,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":74,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":75,"context_line":"        ids \u003d [port_id]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_6bde7440","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":72},"updated":"2016-11-01 09:07:18.000000000","message":"I think this test is meaningless, the method will return nothing in all cases.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":70,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":71,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":72,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":73,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":74,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":75,"context_line":"        ids \u003d [port_id]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_108086bf","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":72},"in_reply_to":"ba5da102_6bde7440","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":74,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":75,"context_line":"        ids \u003d [port_id]"},{"line_number":76,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":77,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_cbe30004","line":76,"range":{"start_line":76,"start_character":0,"end_line":76,"end_character":49},"updated":"2016-11-01 09:07:18.000000000","message":"This has already been done in super class","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":74,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":75,"context_line":"        ids \u003d [port_id]"},{"line_number":76,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":77,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_50867edb","line":76,"range":{"start_line":76,"start_character":0,"end_line":76,"end_character":49},"in_reply_to":"ba5da102_cbe30004","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":80,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":81,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":82,"context_line":"        # normal execution"},{"line_number":83,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_2bbb9ce6","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":72},"updated":"2016-11-01 09:07:18.000000000","message":"see comments above","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":80,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":81,"context_line":"        self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":82,"context_line":"        # normal execution"},{"line_number":83,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_706f022b","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":72},"in_reply_to":"ba5da102_2bbb9ce6","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":88,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("},{"line_number":89,"context_line":"                mock_chassis)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":92,"context_line":"                       \u0027chassis_created\u0027)"},{"line_number":93,"context_line":"    @mock.patch.object(api_nb.NbApi, \u0027get_all_chassis\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_cbca206e","line":90,"updated":"2016-11-01 09:07:18.000000000","message":"I think it will be good to verify the nb_api is correctly called in this test case.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":88,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("},{"line_number":89,"context_line":"                mock_chassis)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":92,"context_line":"                       \u0027chassis_created\u0027)"},{"line_number":93,"context_line":"    @mock.patch.object(api_nb.NbApi, \u0027get_all_chassis\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_30cf4a2a","line":90,"in_reply_to":"ba5da102_cbca206e","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":92,"context_line":"                       \u0027chassis_created\u0027)"},{"line_number":93,"context_line":"    @mock.patch.object(api_nb.NbApi, \u0027get_all_chassis\u0027)"},{"line_number":94,"context_line":"    def test_create_tunnels(self, mock_get_all,"},{"line_number":95,"context_line":"                            mock_create):"},{"line_number":96,"context_line":"        shared_chassis \u003d \u0027matching_chassis\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_ebc9a479","line":93,"range":{"start_line":93,"start_character":0,"end_line":93,"end_character":55},"updated":"2016-11-01 09:07:18.000000000","message":"This has already done in super class.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":92,"context_line":"                       \u0027chassis_created\u0027)"},{"line_number":93,"context_line":"    @mock.patch.object(api_nb.NbApi, \u0027get_all_chassis\u0027)"},{"line_number":94,"context_line":"    def test_create_tunnels(self, mock_get_all,"},{"line_number":95,"context_line":"                            mock_create):"},{"line_number":96,"context_line":"        shared_chassis \u003d \u0027matching_chassis\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_1067a64d","line":93,"range":{"start_line":93,"start_character":0,"end_line":93,"end_character":55},"in_reply_to":"ba5da102_ebc9a479","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        # Each item in the following list tests each branch of the if elif else"},{"line_number":99,"context_line":"        # in the for loop respectively"},{"line_number":100,"context_line":"        chassis_ids \u003d [shared_chassis, self.controller.chassis_name, \u0027else\u0027]"},{"line_number":101,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":102,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":103,"context_line":"            self._get_mock_ports(port_ids))"},{"line_number":104,"context_line":"        self.controller.nb_api \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_cb7300e6","line":101,"range":{"start_line":101,"start_character":0,"end_line":101,"end_character":49},"updated":"2016-11-01 09:07:18.000000000","message":"See comments above.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        # Each item in the following list tests each branch of the if elif else"},{"line_number":99,"context_line":"        # in the for loop respectively"},{"line_number":100,"context_line":"        chassis_ids \u003d [shared_chassis, self.controller.chassis_name, \u0027else\u0027]"},{"line_number":101,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":102,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":103,"context_line":"            self._get_mock_ports(port_ids))"},{"line_number":104,"context_line":"        self.controller.nb_api \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_d0e0ce98","line":101,"range":{"start_line":101,"start_character":0,"end_line":101,"end_character":49},"in_reply_to":"ba5da102_cb7300e6","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":102,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":103,"context_line":"            self._get_mock_ports(port_ids))"},{"line_number":104,"context_line":"        self.controller.nb_api \u003d mock.Mock()"},{"line_number":105,"context_line":"        self.controller.nb_api.get_all_chassis.return_value \u003d ("},{"line_number":106,"context_line":"            self._get_mock_chassis(chassis_ids))"},{"line_number":107,"context_line":"        self.controller.create_tunnels()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_2b4b9c88","line":104,"range":{"start_line":104,"start_character":0,"end_line":104,"end_character":44},"updated":"2016-11-01 09:07:18.000000000","message":"This has already done in super class.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":102,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":103,"context_line":"            self._get_mock_ports(port_ids))"},{"line_number":104,"context_line":"        self.controller.nb_api \u003d mock.Mock()"},{"line_number":105,"context_line":"        self.controller.nb_api.get_all_chassis.return_value \u003d ("},{"line_number":106,"context_line":"            self._get_mock_chassis(chassis_ids))"},{"line_number":107,"context_line":"        self.controller.create_tunnels()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_30e66ab0","line":104,"range":{"start_line":104,"start_character":0,"end_line":104,"end_character":44},"in_reply_to":"ba5da102_2b4b9c88","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfa1e1de4ab781d37cf9b2bb0285ecc2e6ec7709","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        secgroup.get_id.return_value \u003d secgroup_id"},{"line_number":120,"context_line":"        return secgroup"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027update_security_group\u0027)"},{"line_number":123,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":124,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":125,"context_line":"    def test__add_new_security_group(self, mock_add, mock_update):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_6e0a0223","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":65},"updated":"2016-11-01 09:07:18.000000000","message":"dbstore is something that can real in the ut, as it is just cache in df-controller.","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        secgroup.get_id.return_value \u003d secgroup_id"},{"line_number":120,"context_line":"        return secgroup"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027update_security_group\u0027)"},{"line_number":123,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":124,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":125,"context_line":"    def test__add_new_security_group(self, mock_add, mock_update):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_d0f7ee56","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":65},"in_reply_to":"ba5da102_6e0a0223","updated":"2016-11-02 15:56:24.000000000","message":"Done","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"c1719a06fd9a6a8a2cada633360cc4fa87b6b961","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        mock_add.assert_called_once_with(mock_secgroup, rules[0])"},{"line_number":131,"context_line":"        mock_update.assert_called_once_with(secgroup_id, mock_secgroup)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_security_group\u0027)"},{"line_number":134,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":135,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":136,"context_line":"    def test__delete_old_security_group(self, mock_delete, mock_db_delete):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5da102_708b82c3","line":133,"range":{"start_line":133,"start_character":4,"end_line":133,"end_character":65},"updated":"2016-11-02 15:56:24.000000000","message":"Should db_store be removed here as well?","commit_id":"71eea4cca3dd20a9e0102de398fce6bd52689ae0"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"18702ffe3721981e99bb0dbd2800414ae3fcec2a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":64,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":65,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":66,"context_line":"        #self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":67,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":68,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":69,"context_line":"        ids \u003d [port_id]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_9b664beb","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":73},"updated":"2016-11-03 14:28:46.000000000","message":"Remove commented-out code.","commit_id":"19ad3016ec46dcaa1d8da7fdf1d66e3c7cad4aec"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"aca77b6d34c958163690ebab2ee013a2f7ee539f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":64,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":65,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":66,"context_line":"        #self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":67,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":68,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":69,"context_line":"        ids \u003d [port_id]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_8654fd54","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":73},"in_reply_to":"ba5da102_9b664beb","updated":"2016-11-07 18:07:11.000000000","message":"Done","commit_id":"19ad3016ec46dcaa1d8da7fdf1d66e3c7cad4aec"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"18702ffe3721981e99bb0dbd2800414ae3fcec2a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":71,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":72,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":73,"context_line":"        #self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":74,"context_line":"        # normal execution"},{"line_number":75,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_7bb2574d","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":73},"updated":"2016-11-03 14:28:46.000000000","message":"Remove this line if it\u0027s not going to be used.","commit_id":"19ad3016ec46dcaa1d8da7fdf1d66e3c7cad4aec"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"aca77b6d34c958163690ebab2ee013a2f7ee539f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":71,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":72,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":73,"context_line":"        #self.assertIsNone(self.controller.chassis_created(mock_chassis))"},{"line_number":74,"context_line":"        # normal execution"},{"line_number":75,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_665fe972","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":73},"in_reply_to":"ba5da102_7bb2574d","updated":"2016-11-07 18:07:11.000000000","message":"Done","commit_id":"19ad3016ec46dcaa1d8da7fdf1d66e3c7cad4aec"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        all_chassis \u003d []"},{"line_number":30,"context_line":"        for i in ids:"},{"line_number":31,"context_line":"            mock_chassis \u003d mock.Mock()"},{"line_number":32,"context_line":"            mock_chassis.get_id \u003d mock.Mock()"},{"line_number":33,"context_line":"            mock_chassis.get_id.return_value \u003d i"},{"line_number":34,"context_line":"            all_chassis.append(mock_chassis)"},{"line_number":35,"context_line":"        return all_chassis"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_be3001ea","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":45},"updated":"2016-11-15 22:43:47.000000000","message":"Is this line needed? Isn\u0027t get_id already a unique mock object?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b9f24986982222dbc66bd8eb43d6f81ebb01ee3e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        all_chassis \u003d []"},{"line_number":30,"context_line":"        for i in ids:"},{"line_number":31,"context_line":"            mock_chassis \u003d mock.Mock()"},{"line_number":32,"context_line":"            mock_chassis.get_id \u003d mock.Mock()"},{"line_number":33,"context_line":"            mock_chassis.get_id.return_value \u003d i"},{"line_number":34,"context_line":"            all_chassis.append(mock_chassis)"},{"line_number":35,"context_line":"        return all_chassis"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_d06e4f95","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":45},"in_reply_to":"7a77a97e_a2544521","updated":"2016-11-16 22:20:13.000000000","message":"I hadn\u0027t noticed this before. But Omer is right: there is no need to mock an attribute that belongs to a Mock object. From the python.Mock documentation: \"Mocks are callable and create attributes as new mocks when you access them\".","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        all_chassis \u003d []"},{"line_number":30,"context_line":"        for i in ids:"},{"line_number":31,"context_line":"            mock_chassis \u003d mock.Mock()"},{"line_number":32,"context_line":"            mock_chassis.get_id \u003d mock.Mock()"},{"line_number":33,"context_line":"            mock_chassis.get_id.return_value \u003d i"},{"line_number":34,"context_line":"            all_chassis.append(mock_chassis)"},{"line_number":35,"context_line":"        return all_chassis"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_a2544521","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":45},"in_reply_to":"7a77a97e_be3001ea","updated":"2016-11-16 13:07:23.000000000","message":"pretty sure it will throw an AttributeError when you try and access a property that hasn\u0027t been defined. I want the mock object assigned here so get_id is Callable and so I can call use the return_value property.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        all_chassis \u003d []"},{"line_number":30,"context_line":"        for i in ids:"},{"line_number":31,"context_line":"            mock_chassis \u003d mock.Mock()"},{"line_number":32,"context_line":"            mock_chassis.get_id \u003d mock.Mock()"},{"line_number":33,"context_line":"            mock_chassis.get_id.return_value \u003d i"},{"line_number":34,"context_line":"            all_chassis.append(mock_chassis)"},{"line_number":35,"context_line":"        return all_chassis"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_cd669150","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":45},"in_reply_to":"7a77a97e_d06e4f95","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        ports \u003d []"},{"line_number":39,"context_line":"        for chassis_id in chassis_ids:"},{"line_number":40,"context_line":"            mock_port \u003d mock.Mock()"},{"line_number":41,"context_line":"            mock_port.get_chassis_id \u003d mock.Mock()"},{"line_number":42,"context_line":"            mock_port.get_chassis_id.return_value \u003d chassis_id"},{"line_number":43,"context_line":"            ports.append(mock_port)"},{"line_number":44,"context_line":"        return ports"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_5e428d3f","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":50},"updated":"2016-11-15 22:43:47.000000000","message":"Same here","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        ports \u003d []"},{"line_number":39,"context_line":"        for chassis_id in chassis_ids:"},{"line_number":40,"context_line":"            mock_port \u003d mock.Mock()"},{"line_number":41,"context_line":"            mock_port.get_chassis_id \u003d mock.Mock()"},{"line_number":42,"context_line":"            mock_port.get_chassis_id.return_value \u003d chassis_id"},{"line_number":43,"context_line":"            ports.append(mock_port)"},{"line_number":44,"context_line":"        return ports"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_62214db4","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":50},"in_reply_to":"7a77a97e_5e428d3f","updated":"2016-11-16 13:07:23.000000000","message":"see answer on line 32","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        ports \u003d []"},{"line_number":39,"context_line":"        for chassis_id in chassis_ids:"},{"line_number":40,"context_line":"            mock_port \u003d mock.Mock()"},{"line_number":41,"context_line":"            mock_port.get_chassis_id \u003d mock.Mock()"},{"line_number":42,"context_line":"            mock_port.get_chassis_id.return_value \u003d chassis_id"},{"line_number":43,"context_line":"            ports.append(mock_port)"},{"line_number":44,"context_line":"        return ports"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_0d5de978","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":50},"in_reply_to":"7a77a97e_62214db4","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def test_chassis_created(self):"},{"line_number":62,"context_line":"        # test self.chassis_name \u003d\u003d chassis.get_id()"},{"line_number":63,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":64,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":65,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":66,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":67,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_beb56132","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":41},"updated":"2016-11-15 22:43:47.000000000","message":"Same here re: is this explicit mock needed?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def test_chassis_created(self):"},{"line_number":62,"context_line":"        # test self.chassis_name \u003d\u003d chassis.get_id()"},{"line_number":63,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":64,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":65,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":66,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":67,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_2d56255c","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":41},"in_reply_to":"7a77a97e_420d313d","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def test_chassis_created(self):"},{"line_number":62,"context_line":"        # test self.chassis_name \u003d\u003d chassis.get_id()"},{"line_number":63,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":64,"context_line":"        mock_chassis.get_id \u003d mock.Mock()"},{"line_number":65,"context_line":"        mock_chassis.get_id.return_value \u003d self.controller.chassis_name"},{"line_number":66,"context_line":"        # test t_port.get_chassis_id() \u003d\u003d chassis.get_id()"},{"line_number":67,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_420d313d","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":41},"in_reply_to":"7a77a97e_beb56132","updated":"2016-11-16 13:07:23.000000000","message":"see answer on line 32","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":68,"context_line":"        ids \u003d [port_id]"},{"line_number":69,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":70,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":71,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":72,"context_line":"        # normal execution"},{"line_number":73,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_feec392b","line":70,"updated":"2016-11-15 22:43:47.000000000","message":"Doesn\u0027t this override the statement in line 65?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":68,"context_line":"        ids \u003d [port_id]"},{"line_number":69,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":70,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":71,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":72,"context_line":"        # normal execution"},{"line_number":73,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_4d53616b","line":70,"in_reply_to":"7a77a97e_1d247ead","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":68,"context_line":"        ids \u003d [port_id]"},{"line_number":69,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":70,"context_line":"        mock_chassis.get_id.return_value \u003d port_id"},{"line_number":71,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":72,"context_line":"        # normal execution"},{"line_number":73,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_1d247ead","line":70,"in_reply_to":"7a77a97e_feec392b","updated":"2016-11-16 13:07:23.000000000","message":"yes in a previous patch we were testing something that got taken out and the assignment on line 65 was not removed.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # normal execution"},{"line_number":73,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":76,"context_line":"            self._get_mock_ports(ids))"},{"line_number":77,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":78,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_5efa8dbe","line":75,"updated":"2016-11-15 22:43:47.000000000","message":"Doesn\u0027t this override the statement in line 71?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # normal execution"},{"line_number":73,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":76,"context_line":"            self._get_mock_ports(ids))"},{"line_number":77,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":78,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_dd77669d","line":75,"in_reply_to":"7a77a97e_5efa8dbe","updated":"2016-11-16 13:07:23.000000000","message":"I think it was a similar change to one on line 70.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # normal execution"},{"line_number":73,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":76,"context_line":"            self._get_mock_ports(ids))"},{"line_number":77,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":78,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_8d49f9b9","line":75,"in_reply_to":"7a77a97e_dd77669d","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        self.controller.create_tunnels()"},{"line_number":95,"context_line":"        self.nb_api.get_all_chassis.assert_called_once()"},{"line_number":96,"context_line":"        self.controller.chassis_created.assert_called_once_with("},{"line_number":97,"context_line":"            self.controller.nb_api.get_all_chassis.return_value[2])"},{"line_number":98,"context_line":"        # tests iterate all tunnel ports that needs to be deleted"},{"line_number":99,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":100,"context_line":"            self.controller.vswitch_api.get_tunnel_ports.return_value[1])"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_7ecae96f","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":67},"updated":"2016-11-15 22:43:47.000000000","message":"I think it would be clearer to set self._get_mock_chassis(...) to a local variable, and then use it here instead of self.controller.....return_value[2].","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        self.controller.create_tunnels()"},{"line_number":95,"context_line":"        self.nb_api.get_all_chassis.assert_called_once()"},{"line_number":96,"context_line":"        self.controller.chassis_created.assert_called_once_with("},{"line_number":97,"context_line":"            self.controller.nb_api.get_all_chassis.return_value[2])"},{"line_number":98,"context_line":"        # tests iterate all tunnel ports that needs to be deleted"},{"line_number":99,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":100,"context_line":"            self.controller.vswitch_api.get_tunnel_ports.return_value[1])"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_6d757df8","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":67},"in_reply_to":"7a77a97e_7ecae96f","updated":"2016-11-17 15:34:35.000000000","message":"Done, did the same for ports on lines 99-100","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":100,"context_line":"            self.controller.vswitch_api.get_tunnel_ports.return_value[1])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_mock_secgroup(self, rules, secgroup_id):"},{"line_number":103,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":104,"context_line":"        secgroup.get_rules \u003d mock.Mock()"},{"line_number":105,"context_line":"        secgroup.get_rules.return_value \u003d rules"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_de885d25","line":102,"range":{"start_line":102,"start_character":33,"end_line":102,"end_character":51},"updated":"2016-11-15 22:43:47.000000000","message":"nit: I think it will be clearer to reverse the parameters (first the security group\u0027s ID, then its rules)","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":100,"context_line":"            self.controller.vswitch_api.get_tunnel_ports.return_value[1])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_mock_secgroup(self, rules, secgroup_id):"},{"line_number":103,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":104,"context_line":"        secgroup.get_rules \u003d mock.Mock()"},{"line_number":105,"context_line":"        secgroup.get_rules.return_value \u003d rules"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_d07aa887","line":102,"range":{"start_line":102,"start_character":33,"end_line":102,"end_character":51},"in_reply_to":"7a77a97e_de885d25","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_mock_secgroup(self, rules, secgroup_id):"},{"line_number":103,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":104,"context_line":"        secgroup.get_rules \u003d mock.Mock()"},{"line_number":105,"context_line":"        secgroup.get_rules.return_value \u003d rules"},{"line_number":106,"context_line":"        secgroup.get_id \u003d mock.Mock()"},{"line_number":107,"context_line":"        secgroup.get_id.return_value \u003d secgroup_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_1eac959f","line":104,"range":{"start_line":104,"start_character":0,"end_line":104,"end_character":40},"updated":"2016-11-15 22:43:47.000000000","message":"Same here re: Explicit mocking.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_mock_secgroup(self, rules, secgroup_id):"},{"line_number":103,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":104,"context_line":"        secgroup.get_rules \u003d mock.Mock()"},{"line_number":105,"context_line":"        secgroup.get_rules.return_value \u003d rules"},{"line_number":106,"context_line":"        secgroup.get_id \u003d mock.Mock()"},{"line_number":107,"context_line":"        secgroup.get_id.return_value \u003d secgroup_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_b0752c99","line":104,"range":{"start_line":104,"start_character":0,"end_line":104,"end_character":40},"in_reply_to":"7a77a97e_1eac959f","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":104,"context_line":"        secgroup.get_rules \u003d mock.Mock()"},{"line_number":105,"context_line":"        secgroup.get_rules.return_value \u003d rules"},{"line_number":106,"context_line":"        secgroup.get_id \u003d mock.Mock()"},{"line_number":107,"context_line":"        secgroup.get_id.return_value \u003d secgroup_id"},{"line_number":108,"context_line":"        return secgroup"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_3eaf9195","line":106,"range":{"start_line":106,"start_character":0,"end_line":106,"end_character":37},"updated":"2016-11-15 22:43:47.000000000","message":"And here","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":104,"context_line":"        secgroup.get_rules \u003d mock.Mock()"},{"line_number":105,"context_line":"        secgroup.get_rules.return_value \u003d rules"},{"line_number":106,"context_line":"        secgroup.get_id \u003d mock.Mock()"},{"line_number":107,"context_line":"        secgroup.get_id.return_value \u003d secgroup_id"},{"line_number":108,"context_line":"        return secgroup"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_905d9017","line":106,"range":{"start_line":106,"start_character":0,"end_line":106,"end_character":37},"in_reply_to":"7a77a97e_3eaf9195","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a8e8eaf02ee01d328e9994f586b7230a91860cdd","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":111,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":112,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":113,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":114,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":115,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(rules, secgroup_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_924b492b","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":14},"updated":"2016-11-08 02:52:18.000000000","message":"typo?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e0303666fec63bc4514a5b50055ade99994a0fac","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":111,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":112,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":113,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":114,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":115,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(rules, secgroup_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_58cce869","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":14},"in_reply_to":"9a629dbe_09b5f02f","updated":"2016-11-18 02:13:27.000000000","message":"+1, it\u0027s ok with double underline","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"63dcb8634b6e78545d492f0d49acf77c4073d6b8","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":111,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":112,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":113,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":114,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":115,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(rules, secgroup_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_09b5f02f","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":14},"in_reply_to":"9a629dbe_924b492b","updated":"2016-11-09 19:45:25.000000000","message":"Typed like that to specify that they\u0027re testing a private function.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a8e8eaf02ee01d328e9994f586b7230a91860cdd","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_security_group\u0027)"},{"line_number":122,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":123,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":124,"context_line":"    def test__delete_old_security_group(self, mock_delete, mock_db_delete):"},{"line_number":125,"context_line":"        rules \u003d [\u0027old_rule\u0027]"},{"line_number":126,"context_line":"        secgroup_id \u003d \u0027fake_id\u0027"},{"line_number":127,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(rules, secgroup_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_b2484d2f","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":14},"updated":"2016-11-08 02:52:18.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"63dcb8634b6e78545d492f0d49acf77c4073d6b8","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_security_group\u0027)"},{"line_number":122,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":123,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":124,"context_line":"    def test__delete_old_security_group(self, mock_delete, mock_db_delete):"},{"line_number":125,"context_line":"        rules \u003d [\u0027old_rule\u0027]"},{"line_number":126,"context_line":"        secgroup_id \u003d \u0027fake_id\u0027"},{"line_number":127,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(rules, secgroup_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_e98efc77","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":14},"in_reply_to":"9a629dbe_b2484d2f","updated":"2016-11-09 19:45:25.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _get_mock_floatingip(self, lport_id, fip_id):"},{"line_number":169,"context_line":"        floatingip \u003d mock.Mock()"},{"line_number":170,"context_line":"        floatingip.get_lport_id \u003d mock.Mock()"},{"line_number":171,"context_line":"        floatingip.get_lport_id.return_value \u003d lport_id"},{"line_number":172,"context_line":"        floatingip.get_id \u003d mock.Mock()"},{"line_number":173,"context_line":"        floatingip.get_id.return_value \u003d fip_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_7e9f4950","line":170,"range":{"start_line":170,"start_character":0,"end_line":170,"end_character":45},"updated":"2016-11-15 22:43:47.000000000","message":"Same here re: explicit mocking.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _get_mock_floatingip(self, lport_id, fip_id):"},{"line_number":169,"context_line":"        floatingip \u003d mock.Mock()"},{"line_number":170,"context_line":"        floatingip.get_lport_id \u003d mock.Mock()"},{"line_number":171,"context_line":"        floatingip.get_lport_id.return_value \u003d lport_id"},{"line_number":172,"context_line":"        floatingip.get_id \u003d mock.Mock()"},{"line_number":173,"context_line":"        floatingip.get_id.return_value \u003d fip_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_f0a244fb","line":170,"range":{"start_line":170,"start_character":0,"end_line":170,"end_character":45},"in_reply_to":"7a77a97e_7e9f4950","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        floatingip \u003d mock.Mock()"},{"line_number":170,"context_line":"        floatingip.get_lport_id \u003d mock.Mock()"},{"line_number":171,"context_line":"        floatingip.get_lport_id.return_value \u003d lport_id"},{"line_number":172,"context_line":"        floatingip.get_id \u003d mock.Mock()"},{"line_number":173,"context_line":"        floatingip.get_id.return_value \u003d fip_id"},{"line_number":174,"context_line":"        return floatingip"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_9eaee583","line":172,"range":{"start_line":172,"start_character":0,"end_line":172,"end_character":39},"updated":"2016-11-15 22:43:47.000000000","message":"and here","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        floatingip \u003d mock.Mock()"},{"line_number":170,"context_line":"        floatingip.get_lport_id \u003d mock.Mock()"},{"line_number":171,"context_line":"        floatingip.get_lport_id.return_value \u003d lport_id"},{"line_number":172,"context_line":"        floatingip.get_id \u003d mock.Mock()"},{"line_number":173,"context_line":"        floatingip.get_id.return_value \u003d fip_id"},{"line_number":174,"context_line":"        return floatingip"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_10a8a0da","line":172,"range":{"start_line":172,"start_character":0,"end_line":172,"end_character":39},"in_reply_to":"7a77a97e_9eaee583","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        mock_get_fip.return_value \u003d None"},{"line_number":194,"context_line":"        fip.get_lport_id.return_value \u003d None"},{"line_number":195,"context_line":"        self.assertIsNone(self.controller.floatingip_updated(fip))"},{"line_number":196,"context_line":"        mock_get_fip.assert_called_once_with(fip_id)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        mock_get_lport.return_value \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_be4561b4","line":195,"range":{"start_line":195,"start_character":0,"end_line":195,"end_character":66},"updated":"2016-11-15 22:43:47.000000000","message":"What is this test for? floatingip_updated syntactically always returns None, and no caller reads the return value in the code.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e0303666fec63bc4514a5b50055ade99994a0fac","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        mock_get_fip.return_value \u003d None"},{"line_number":194,"context_line":"        fip.get_lport_id.return_value \u003d None"},{"line_number":195,"context_line":"        self.assertIsNone(self.controller.floatingip_updated(fip))"},{"line_number":196,"context_line":"        mock_get_fip.assert_called_once_with(fip_id)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        mock_get_lport.return_value \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_d84b9885","line":195,"range":{"start_line":195,"start_character":0,"end_line":195,"end_character":66},"in_reply_to":"7a77a97e_7ddc9212","updated":"2016-11-18 02:13:27.000000000","message":"In my opinion, we need to deal with the return value later to make the function stable. In this unit test, I don\u0027t suggest to directly determine the None value if no one cares about it. We need to make sure a certain function is called with certain arguments, such that we can make sure the logic is right or wrong.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        mock_get_fip.return_value \u003d None"},{"line_number":194,"context_line":"        fip.get_lport_id.return_value \u003d None"},{"line_number":195,"context_line":"        self.assertIsNone(self.controller.floatingip_updated(fip))"},{"line_number":196,"context_line":"        mock_get_fip.assert_called_once_with(fip_id)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        mock_get_lport.return_value \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_7ddc9212","line":195,"range":{"start_line":195,"start_character":0,"end_line":195,"end_character":66},"in_reply_to":"7a77a97e_be4561b4","updated":"2016-11-16 13:07:23.000000000","message":"We have been removing these and that\u0027s why you have been seeing the return values getting over written.\n\nWhen I write unit tests I walk the code and make sure the lines are covered with these testing calls. When a function returns None and it\u0027s not just at the end of the function I like to assert it returns None. What if someone modified the code to return something that was not None? If it\u0027s after this case it will pass and fail if it\u0027s before this case. That\u0027s not what we want? Other unit tests might mock this function and may not catch the return type.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":219,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":220,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"},{"line_number":221,"context_line":"        self.assertIsNone(self.controller.floatingip_deleted(fip_id))"},{"line_number":222,"context_line":"        mock_get_fip.return_value \u003d fip"},{"line_number":223,"context_line":"        self.controller.floatingip_deleted(fip_id)"},{"line_number":224,"context_line":"        mock_notify.assert_called_once_with(fip)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_3e8791d8","line":221,"range":{"start_line":221,"start_character":0,"end_line":221,"end_character":69},"updated":"2016-11-15 22:43:47.000000000","message":"Same here re: Return value\n\nMaybe also assert that mock_notify is not called?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e0303666fec63bc4514a5b50055ade99994a0fac","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":219,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":220,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"},{"line_number":221,"context_line":"        self.assertIsNone(self.controller.floatingip_deleted(fip_id))"},{"line_number":222,"context_line":"        mock_get_fip.return_value \u003d fip"},{"line_number":223,"context_line":"        self.controller.floatingip_deleted(fip_id)"},{"line_number":224,"context_line":"        mock_notify.assert_called_once_with(fip)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_b81b3cc9","line":221,"range":{"start_line":221,"start_character":0,"end_line":221,"end_character":69},"in_reply_to":"7a77a97e_3d6e9a2f","updated":"2016-11-18 02:13:27.000000000","message":"I\u0027m with Omer. I think asserting mock_notify not being called is easier to understand.","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"20aeaf9e6c1e2dbd048b552b3dc10595b40bda21","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":219,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":220,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"},{"line_number":221,"context_line":"        self.assertIsNone(self.controller.floatingip_deleted(fip_id))"},{"line_number":222,"context_line":"        mock_get_fip.return_value \u003d fip"},{"line_number":223,"context_line":"        self.controller.floatingip_deleted(fip_id)"},{"line_number":224,"context_line":"        mock_notify.assert_called_once_with(fip)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_3d6e9a2f","line":221,"range":{"start_line":221,"start_character":0,"end_line":221,"end_character":69},"in_reply_to":"7a77a97e_3e8791d8","updated":"2016-11-16 13:07:23.000000000","message":"see answer on line 195.\n\nAsserting mock_notify not being called is like asserting None on a return call. That happens by default right?","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _get_mock_publisher(self, uri, publisher_id):"},{"line_number":227,"context_line":"        publisher \u003d mock.Mock()"},{"line_number":228,"context_line":"        publisher.get_uri \u003d mock.Mock()"},{"line_number":229,"context_line":"        publisher.get_uri.return_value \u003d uri"},{"line_number":230,"context_line":"        publisher.get_id \u003d mock.Mock()"},{"line_number":231,"context_line":"        publisher.get_id.return_value \u003d publisher_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_1eb73587","line":228,"range":{"start_line":228,"start_character":0,"end_line":228,"end_character":39},"updated":"2016-11-15 22:43:47.000000000","message":"Same here re: Explicit mock","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _get_mock_publisher(self, uri, publisher_id):"},{"line_number":227,"context_line":"        publisher \u003d mock.Mock()"},{"line_number":228,"context_line":"        publisher.get_uri \u003d mock.Mock()"},{"line_number":229,"context_line":"        publisher.get_uri.return_value \u003d uri"},{"line_number":230,"context_line":"        publisher.get_id \u003d mock.Mock()"},{"line_number":231,"context_line":"        publisher.get_id.return_value \u003d publisher_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_10442019","line":228,"range":{"start_line":228,"start_character":0,"end_line":228,"end_character":39},"in_reply_to":"7a77a97e_1eb73587","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a5932c6f938b6c282cc847ad4b13ea2db3cbbaa2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        publisher \u003d mock.Mock()"},{"line_number":228,"context_line":"        publisher.get_uri \u003d mock.Mock()"},{"line_number":229,"context_line":"        publisher.get_uri.return_value \u003d uri"},{"line_number":230,"context_line":"        publisher.get_id \u003d mock.Mock()"},{"line_number":231,"context_line":"        publisher.get_id.return_value \u003d publisher_id"},{"line_number":232,"context_line":"        return publisher"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_5eb1ad8e","line":230,"range":{"start_line":230,"start_character":0,"end_line":230,"end_character":38},"updated":"2016-11-15 22:43:47.000000000","message":"And here","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"ce7bb7b36114f7ad8471043b2ad797db8ee3e452","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        publisher \u003d mock.Mock()"},{"line_number":228,"context_line":"        publisher.get_uri \u003d mock.Mock()"},{"line_number":229,"context_line":"        publisher.get_uri.return_value \u003d uri"},{"line_number":230,"context_line":"        publisher.get_id \u003d mock.Mock()"},{"line_number":231,"context_line":"        publisher.get_id.return_value \u003d publisher_id"},{"line_number":232,"context_line":"        return publisher"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_304d9c3e","line":230,"range":{"start_line":230,"start_character":0,"end_line":230,"end_character":38},"in_reply_to":"7a77a97e_5eb1ad8e","updated":"2016-11-17 15:34:35.000000000","message":"Done","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a8e8eaf02ee01d328e9994f586b7230a91860cdd","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":235,"context_line":"                       \u0027notify_associate_floatingip\u0027)"},{"line_number":236,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027update_floatingip\u0027)"},{"line_number":237,"context_line":"    def test__associate_floatingip(self, mock_update, mock_notify):"},{"line_number":238,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":239,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":240,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_d26ce19e","line":237,"range":{"start_line":237,"start_character":12,"end_line":237,"end_character":14},"updated":"2016-11-08 02:52:18.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"63dcb8634b6e78545d492f0d49acf77c4073d6b8","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":235,"context_line":"                       \u0027notify_associate_floatingip\u0027)"},{"line_number":236,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027update_floatingip\u0027)"},{"line_number":237,"context_line":"    def test__associate_floatingip(self, mock_update, mock_notify):"},{"line_number":238,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":239,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":240,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_49f0c8fe","line":237,"range":{"start_line":237,"start_character":12,"end_line":237,"end_character":14},"in_reply_to":"9a629dbe_d26ce19e","updated":"2016-11-09 19:45:25.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a8e8eaf02ee01d328e9994f586b7230a91860cdd","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":246,"context_line":"                       \u0027notify_disassociate_floatingip\u0027)"},{"line_number":247,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_floatingip\u0027)"},{"line_number":248,"context_line":"    def test__disassociate_floatingip(self, mock_delete, mock_notify):"},{"line_number":249,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":250,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":251,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_9272697b","line":248,"range":{"start_line":248,"start_character":12,"end_line":248,"end_character":14},"updated":"2016-11-08 02:52:18.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"63dcb8634b6e78545d492f0d49acf77c4073d6b8","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":246,"context_line":"                       \u0027notify_disassociate_floatingip\u0027)"},{"line_number":247,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_floatingip\u0027)"},{"line_number":248,"context_line":"    def test__disassociate_floatingip(self, mock_delete, mock_notify):"},{"line_number":249,"context_line":"        lport_id \u003d \u0027fake_lport_id\u0027"},{"line_number":250,"context_line":"        fip_id \u003d \u0027fake_fip_id\u0027"},{"line_number":251,"context_line":"        fip \u003d self._get_mock_floatingip(lport_id, fip_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_89f660f7","line":248,"range":{"start_line":248,"start_character":12,"end_line":248,"end_character":14},"in_reply_to":"9a629dbe_9272697b","updated":"2016-11-09 19:45:25.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a8e8eaf02ee01d328e9994f586b7230a91860cdd","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                       \u0027_associate_floatingip\u0027)"},{"line_number":258,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":259,"context_line":"                       \u0027_disassociate_floatingip\u0027)"},{"line_number":260,"context_line":"    def test__update_floatingip(self, mock_disassoc, mock_assoc):"},{"line_number":261,"context_line":"        old_lport_id \u003d \u0027fake_old_lport_id\u0027"},{"line_number":262,"context_line":"        old_fip_id \u003d \u0027fake_old_fip_id\u0027"},{"line_number":263,"context_line":"        old_fip \u003d self._get_mock_floatingip(old_lport_id, old_fip_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_f252c5dc","line":260,"range":{"start_line":260,"start_character":12,"end_line":260,"end_character":14},"updated":"2016-11-08 02:52:18.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":21930,"name":"Steve Kipp","email":"sk167v@att.com","username":"SKipp"},"change_message_id":"63dcb8634b6e78545d492f0d49acf77c4073d6b8","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                       \u0027_associate_floatingip\u0027)"},{"line_number":258,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":259,"context_line":"                       \u0027_disassociate_floatingip\u0027)"},{"line_number":260,"context_line":"    def test__update_floatingip(self, mock_disassoc, mock_assoc):"},{"line_number":261,"context_line":"        old_lport_id \u003d \u0027fake_old_lport_id\u0027"},{"line_number":262,"context_line":"        old_fip_id \u003d \u0027fake_old_fip_id\u0027"},{"line_number":263,"context_line":"        old_fip \u003d self._get_mock_floatingip(old_lport_id, old_fip_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_29d2b45c","line":260,"range":{"start_line":260,"start_character":12,"end_line":260,"end_character":14},"in_reply_to":"9a629dbe_f252c5dc","updated":"2016-11-09 19:45:25.000000000","message":"ditto","commit_id":"44c311ff382e0de518e8c7a74f3eb7d66de4a88a"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"c409410877a6be88e0a55df3cdfc930c80b9ac08","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    apps_list \u003d \"l2_ml2_app.L2App\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":29,"context_line":"        all_chassis \u003d []"},{"line_number":30,"context_line":"        for i in ids:"},{"line_number":31,"context_line":"            mock_chassis \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_7bc4dc91","line":28,"range":{"start_line":28,"start_character":32,"end_line":28,"end_character":35},"updated":"2016-11-23 13:38:33.000000000","message":"maybe change the arg name to chassis_ids which is similar with _get_mock_ports will make the code more readable:)","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"dc0150f501d8d5c66b350b5fb114ff0dca3f5b08","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    apps_list \u003d \"l2_ml2_app.L2App\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def _get_mock_chassis(self, ids):"},{"line_number":29,"context_line":"        all_chassis \u003d []"},{"line_number":30,"context_line":"        for i in ids:"},{"line_number":31,"context_line":"            mock_chassis \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_d9e905e8","line":28,"range":{"start_line":28,"start_character":32,"end_line":28,"end_character":35},"in_reply_to":"5a74a57a_7bc4dc91","updated":"2016-11-25 21:01:46.000000000","message":"Done","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"c409410877a6be88e0a55df3cdfc930c80b9ac08","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_chassis_created(self):"},{"line_number":60,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":61,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":62,"context_line":"        ids \u003d [port_id]"},{"line_number":63,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":64,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_db7410ff","line":61,"range":{"start_line":61,"start_character":8,"end_line":61,"end_character":15},"updated":"2016-11-23 13:38:33.000000000","message":"port_id?? not chassis_id??","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"dc0150f501d8d5c66b350b5fb114ff0dca3f5b08","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_chassis_created(self):"},{"line_number":60,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":61,"context_line":"        port_id \u003d \u0027fake_port_id\u0027"},{"line_number":62,"context_line":"        ids \u003d [port_id]"},{"line_number":63,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":64,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_b8b1a849","line":61,"range":{"start_line":61,"start_character":8,"end_line":61,"end_character":15},"in_reply_to":"5a74a57a_db7410ff","updated":"2016-11-25 21:01:46.000000000","message":"I\u0027ve refactored this function. Hopefully it makes more sense now.","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"c409410877a6be88e0a55df3cdfc930c80b9ac08","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":64,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":65,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":66,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":67,"context_line":"            self._get_mock_ports(ids))"},{"line_number":68,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":69,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("},{"line_number":70,"context_line":"            mock_chassis)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_56461724","line":67,"range":{"start_line":66,"start_character":8,"end_line":67,"end_character":38},"updated":"2016-11-23 13:38:33.000000000","message":"override the previous value.","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"dc0150f501d8d5c66b350b5fb114ff0dca3f5b08","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":64,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":65,"context_line":"        ids \u003d [\u0027not %s\u0027 % self.controller.chassis_name]"},{"line_number":66,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":67,"context_line":"            self._get_mock_ports(ids))"},{"line_number":68,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":69,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("},{"line_number":70,"context_line":"            mock_chassis)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_199e1d63","line":67,"range":{"start_line":66,"start_character":8,"end_line":67,"end_character":38},"in_reply_to":"5a74a57a_56461724","updated":"2016-11-25 21:01:46.000000000","message":"Fixed in refactor","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"c409410877a6be88e0a55df3cdfc930c80b9ac08","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def test_create_tunnels(self,"},{"line_number":75,"context_line":"                            mock_create):"},{"line_number":76,"context_line":"        shared_chassis \u003d \u0027matching_chassis\u0027"},{"line_number":77,"context_line":"        port_ids \u003d [shared_chassis, \u0027to be deleted\u0027]"},{"line_number":78,"context_line":"        # Each item in the following list tests each branch of the if elif else"},{"line_number":79,"context_line":"        # in the for loop respectively"},{"line_number":80,"context_line":"        chassis_ids \u003d [shared_chassis, self.controller.chassis_name, \u0027else\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_16bbbfc5","line":77,"range":{"start_line":77,"start_character":8,"end_line":77,"end_character":16},"updated":"2016-11-23 13:38:33.000000000","message":"Consider rename it:)","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"dc0150f501d8d5c66b350b5fb114ff0dca3f5b08","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def test_create_tunnels(self,"},{"line_number":75,"context_line":"                            mock_create):"},{"line_number":76,"context_line":"        shared_chassis \u003d \u0027matching_chassis\u0027"},{"line_number":77,"context_line":"        port_ids \u003d [shared_chassis, \u0027to be deleted\u0027]"},{"line_number":78,"context_line":"        # Each item in the following list tests each branch of the if elif else"},{"line_number":79,"context_line":"        # in the for loop respectively"},{"line_number":80,"context_line":"        chassis_ids \u003d [shared_chassis, self.controller.chassis_name, \u0027else\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_d956655b","line":77,"range":{"start_line":77,"start_character":8,"end_line":77,"end_character":16},"in_reply_to":"5a74a57a_16bbbfc5","updated":"2016-11-25 21:01:46.000000000","message":"why? This is the return value of get_tunnel_ports() this makes sense to me.","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"c409410877a6be88e0a55df3cdfc930c80b9ac08","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":99,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":100,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":101,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":102,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":103,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(secgroup_id, rules)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_b6776b01","line":100,"range":{"start_line":100,"start_character":12,"end_line":100,"end_character":14},"updated":"2016-11-23 13:38:33.000000000","message":"_","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"dc0150f501d8d5c66b350b5fb114ff0dca3f5b08","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":99,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":100,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":101,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":102,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":103,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(secgroup_id, rules)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_96e59cdd","line":100,"range":{"start_line":100,"start_character":12,"end_line":100,"end_character":14},"in_reply_to":"5a74a57a_b6776b01","updated":"2016-11-25 21:01:46.000000000","message":"How would you name a test function for:\n  * def _add_new_securitygroup()\nAND\n  * def add_new_securitygroup()","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"5fac978ce0de6137906e94cfd22eadd669cadabb","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    def test_logical_switch_deleted(self, mock_get_lswitch,"},{"line_number":273,"context_line":"            mock_notify_remove, mock_del_lswitch, mock_del_network):"},{"line_number":274,"context_line":"        mock_get_lswitch.return_value \u003d None"},{"line_number":275,"context_line":"        self.assertEqual(self.controller.logical_switch_deleted(mock.Mock()),"},{"line_number":276,"context_line":"            None)"},{"line_number":277,"context_line":"        lswitch_id \u003d \u0027theLswitchId\u0027"},{"line_number":278,"context_line":"        lswitch \u003d \u0027theLswitch\u0027"},{"line_number":279,"context_line":"        mock_get_lswitch.return_value \u003d lswitch"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_454f3192","line":276,"range":{"start_line":275,"start_character":0,"end_line":276,"end_character":17},"updated":"2016-11-23 16:52:45.000000000","message":"What are you testing? \"logical_switch_deleted\" always returns None. If you want to check for exceptions, maybe it is better to use \"try\"","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"43e1bdbab4e577206662be77f3d84f483648978e","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    def test_logical_switch_deleted(self, mock_get_lswitch,"},{"line_number":273,"context_line":"            mock_notify_remove, mock_del_lswitch, mock_del_network):"},{"line_number":274,"context_line":"        mock_get_lswitch.return_value \u003d None"},{"line_number":275,"context_line":"        self.assertEqual(self.controller.logical_switch_deleted(mock.Mock()),"},{"line_number":276,"context_line":"            None)"},{"line_number":277,"context_line":"        lswitch_id \u003d \u0027theLswitchId\u0027"},{"line_number":278,"context_line":"        lswitch \u003d \u0027theLswitch\u0027"},{"line_number":279,"context_line":"        mock_get_lswitch.return_value \u003d lswitch"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_ae3c06c9","line":276,"range":{"start_line":275,"start_character":0,"end_line":276,"end_character":17},"in_reply_to":"5a74a57a_454f3192","updated":"2016-11-25 16:09:33.000000000","message":"So this is why we get a lot of \"This is overriding the previous return value\" This line gets removed but then the one above it does not. I\u0027m going to work on this to test the file better.","commit_id":"b8c4f54e2ccce4c8088f97f8a24eb6f3d7abdf61"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            mock_ports[0])"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_chassis_created_if_self_installed(self):"},{"line_number":51,"context_line":"        mock_ports \u003d self._get_mock_ports([\u0027fake_port_id\u0027])"},{"line_number":52,"context_line":"        ids \u003d [self.controller.chassis_name]"},{"line_number":53,"context_line":"        mock_chassis \u003d self._get_mock_chassis(ids)[0]"},{"line_number":54,"context_line":"        self.controller.chassis_created(mock_chassis)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_3c574227","line":51,"range":{"start_line":51,"start_character":43,"end_line":51,"end_character":57},"updated":"2016-11-26 13:22:48.000000000","message":"consider change the arg name because it\u0027s chassis_id","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            mock_ports[0])"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_chassis_created_if_self_installed(self):"},{"line_number":51,"context_line":"        mock_ports \u003d self._get_mock_ports([\u0027fake_port_id\u0027])"},{"line_number":52,"context_line":"        ids \u003d [self.controller.chassis_name]"},{"line_number":53,"context_line":"        mock_chassis \u003d self._get_mock_chassis(ids)[0]"},{"line_number":54,"context_line":"        self.controller.chassis_created(mock_chassis)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_057a0377","line":51,"range":{"start_line":51,"start_character":43,"end_line":51,"end_character":57},"in_reply_to":"5a74a57a_3c574227","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        self.assertFalse(self.controller.vswitch_api.add_tunnel_port.called)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_chassis_created_if_remote_installed(self):"},{"line_number":59,"context_line":"        ids \u003d [\u0027fake_port_id\u0027]"},{"line_number":60,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":61,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":62,"context_line":"        mock_chassis \u003d self._get_mock_chassis(ids)[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_bc3992f4","line":59,"range":{"start_line":59,"start_character":14,"end_line":59,"end_character":29},"updated":"2016-11-26 13:22:48.000000000","message":"ditto","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        self.assertFalse(self.controller.vswitch_api.add_tunnel_port.called)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_chassis_created_if_remote_installed(self):"},{"line_number":59,"context_line":"        ids \u003d [\u0027fake_port_id\u0027]"},{"line_number":60,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":61,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":62,"context_line":"        mock_chassis \u003d self._get_mock_chassis(ids)[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_257fff66","line":59,"range":{"start_line":59,"start_character":14,"end_line":59,"end_character":29},"in_reply_to":"5a74a57a_bc3992f4","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.assertFalse(self.controller.vswitch_api.add_tunnel_port.called)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_chassis_created(self):"},{"line_number":68,"context_line":"        ids \u003d [\u0027fake_port_id\u0027]"},{"line_number":69,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":70,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":71,"context_line":"            self._get_mock_ports(ids))"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_1c0c4640","line":68,"range":{"start_line":68,"start_character":15,"end_line":68,"end_character":29},"updated":"2016-11-26 13:22:48.000000000","message":"ditto","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.assertFalse(self.controller.vswitch_api.add_tunnel_port.called)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_chassis_created(self):"},{"line_number":68,"context_line":"        ids \u003d [\u0027fake_port_id\u0027]"},{"line_number":69,"context_line":"        mock_chassis \u003d mock.Mock()"},{"line_number":70,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d ("},{"line_number":71,"context_line":"            self._get_mock_ports(ids))"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_65957785","line":68,"range":{"start_line":68,"start_character":15,"end_line":68,"end_character":29},"in_reply_to":"5a74a57a_1c0c4640","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":99,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":100,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":101,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":102,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":103,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(secgroup_id, rules)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_3f1c9469","line":100,"range":{"start_line":100,"start_character":12,"end_line":100,"end_character":14},"updated":"2016-11-26 13:22:48.000000000","message":"_","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":99,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":100,"context_line":"    def test__add_new_security_group(self, mock_add):"},{"line_number":101,"context_line":"        rules \u003d [\u0027new_rule\u0027]"},{"line_number":102,"context_line":"        secgroup_id \u003d \u0027fake id\u0027"},{"line_number":103,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(secgroup_id, rules)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_858e1377","line":100,"range":{"start_line":100,"start_character":12,"end_line":100,"end_character":14},"in_reply_to":"5a74a57a_3f1c9469","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_security_group\u0027)"},{"line_number":110,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":111,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":112,"context_line":"    def test__delete_old_security_group(self, mock_delete, mock_db_delete):"},{"line_number":113,"context_line":"        rules \u003d [\u0027old_rule\u0027]"},{"line_number":114,"context_line":"        secgroup_id \u003d \u0027fake_id\u0027"},{"line_number":115,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(secgroup_id, rules)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_5f195078","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":14},"updated":"2016-11-26 13:22:48.000000000","message":"_","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    @mock.patch.object(db_store.DbStore, \u0027delete_security_group\u0027)"},{"line_number":110,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":111,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":112,"context_line":"    def test__delete_old_security_group(self, mock_delete, mock_db_delete):"},{"line_number":113,"context_line":"        rules \u003d [\u0027old_rule\u0027]"},{"line_number":114,"context_line":"        secgroup_id \u003d \u0027fake_id\u0027"},{"line_number":115,"context_line":"        mock_secgroup \u003d self._get_mock_secgroup(secgroup_id, rules)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_c5eacb0e","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":14},"in_reply_to":"5a74a57a_5f195078","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":122,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":123,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":124,"context_line":"    def test__update_security_group_rules(self, mock_add, mock_delete):"},{"line_number":125,"context_line":"        shared_rule \u003d \u0027to_be_removed\u0027"},{"line_number":126,"context_line":"        secgroup_id \u003d \u0027fake_id\u0027"},{"line_number":127,"context_line":"        old_rules \u003d [shared_rule, \u0027old_rule\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_9f2da897","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":14},"updated":"2016-11-26 13:22:48.000000000","message":"_","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                       \u0027_delete_security_group_rule\u0027)"},{"line_number":122,"context_line":"    @mock.patch.object(df_local_controller.DfLocalController,"},{"line_number":123,"context_line":"                       \u0027_add_new_security_group_rule\u0027)"},{"line_number":124,"context_line":"    def test__update_security_group_rules(self, mock_add, mock_delete):"},{"line_number":125,"context_line":"        shared_rule \u003d \u0027to_be_removed\u0027"},{"line_number":126,"context_line":"        secgroup_id \u003d \u0027fake_id\u0027"},{"line_number":127,"context_line":"        old_rules \u003d [shared_rule, \u0027old_rule\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_05f12301","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":14},"in_reply_to":"5a74a57a_9f2da897","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":141,"context_line":"                       \u0027notify_add_security_group_rule\u0027)"},{"line_number":142,"context_line":"    def test__add_new_security_group_rule(self, mock_app_notify):"},{"line_number":143,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":144,"context_line":"        secgroup_rule \u003d mock.Mock()"},{"line_number":145,"context_line":"        self.controller._add_new_security_group_rule(secgroup, secgroup_rule)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_ff3cdcc9","line":142,"range":{"start_line":142,"start_character":12,"end_line":142,"end_character":14},"updated":"2016-11-26 13:22:48.000000000","message":"_","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":141,"context_line":"                       \u0027notify_add_security_group_rule\u0027)"},{"line_number":142,"context_line":"    def test__add_new_security_group_rule(self, mock_app_notify):"},{"line_number":143,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":144,"context_line":"        secgroup_rule \u003d mock.Mock()"},{"line_number":145,"context_line":"        self.controller._add_new_security_group_rule(secgroup, secgroup_rule)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_25f61ff9","line":142,"range":{"start_line":142,"start_character":12,"end_line":142,"end_character":14},"in_reply_to":"5a74a57a_ff3cdcc9","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d4e33c23c7f6b785827932d273fbced188fa2cf2","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":149,"context_line":"                       \u0027notify_remove_security_group_rule\u0027)"},{"line_number":150,"context_line":"    def test__delete_security_group_rule(self, mock_app_notify):"},{"line_number":151,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":152,"context_line":"        secgroup_rule \u003d mock.Mock()"},{"line_number":153,"context_line":"        self.controller._delete_security_group_rule(secgroup, secgroup_rule)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_3f33b4f7","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":14},"updated":"2016-11-26 13:22:48.000000000","message":"_","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"34a4b173385e8e7d4384f041db341dd6d434645c","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @mock.patch.object(ryu_base_app.RyuDFAdapter,"},{"line_number":149,"context_line":"                       \u0027notify_remove_security_group_rule\u0027)"},{"line_number":150,"context_line":"    def test__delete_security_group_rule(self, mock_app_notify):"},{"line_number":151,"context_line":"        secgroup \u003d mock.Mock()"},{"line_number":152,"context_line":"        secgroup_rule \u003d mock.Mock()"},{"line_number":153,"context_line":"        self.controller._delete_security_group_rule(secgroup, secgroup_rule)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_45df9b68","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":14},"in_reply_to":"5a74a57a_3f33b4f7","updated":"2016-11-28 14:08:18.000000000","message":"Done","commit_id":"041de3f8da52efa7bbc9edd9b55deb514d96526d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"fda4b70dcf7dc4b3c890cf96ec0009fa9568a50c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":44,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":45,"context_line":"        self.controller.chassis_deleted(ids[0])"},{"line_number":46,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.assert_called_once()"},{"line_number":47,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":48,"context_line":"            mock_ports[0])"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_33ad5f9b","line":46,"range":{"start_line":46,"start_character":53,"end_line":46,"end_character":71},"updated":"2016-11-29 09:53:03.000000000","message":"And here","commit_id":"b07b9324e2ebeb0943057bbec9b999626b0191fc"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"f40393f4ab2b99b15c485cddcd379345b20ca21b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        mock_ports \u003d self._get_mock_ports(ids)"},{"line_number":44,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":45,"context_line":"        self.controller.chassis_deleted(ids[0])"},{"line_number":46,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.assert_called_once()"},{"line_number":47,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":48,"context_line":"            mock_ports[0])"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_2bc79696","line":46,"range":{"start_line":46,"start_character":53,"end_line":46,"end_character":71},"in_reply_to":"5a74a57a_33ad5f9b","updated":"2016-11-29 14:01:41.000000000","message":"Done","commit_id":"b07b9324e2ebeb0943057bbec9b999626b0191fc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2663464fc6b22f9abf04f69bce3c680e24a40b25","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":62,"context_line":"        mock_chassis \u003d self._get_mock_chassis(ids)[0]"},{"line_number":63,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":64,"context_line":"        mock_ports[0].get_chassis_id.called_once_with()"},{"line_number":65,"context_line":"        self.assertFalse(self.controller.vswitch_api.add_tunnel_port.called)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_chassis_created(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_e975c231","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":55},"updated":"2016-11-29 03:28:45.000000000","message":"typo: called_once_with -\u003e assert_called_once_with ?","commit_id":"b07b9324e2ebeb0943057bbec9b999626b0191fc"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"f40393f4ab2b99b15c485cddcd379345b20ca21b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.controller.vswitch_api.get_tunnel_ports.return_value \u003d mock_ports"},{"line_number":62,"context_line":"        mock_chassis \u003d self._get_mock_chassis(ids)[0]"},{"line_number":63,"context_line":"        self.controller.chassis_created(mock_chassis)"},{"line_number":64,"context_line":"        mock_ports[0].get_chassis_id.called_once_with()"},{"line_number":65,"context_line":"        self.assertFalse(self.controller.vswitch_api.add_tunnel_port.called)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_chassis_created(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_4bc21286","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":55},"in_reply_to":"5a74a57a_e975c231","updated":"2016-11-29 14:01:41.000000000","message":"Done","commit_id":"b07b9324e2ebeb0943057bbec9b999626b0191fc"}]}
