)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"520fef52030d5fbc086c86cb4d25966ff2802e4c","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":"from sqlalchemy import and_"},{"line_number":21,"context_line":"from sqlalchemy import event"},{"line_number":22,"context_line":"from sqlalchemy import orm"},{"line_number":23,"context_line":"from sqlalchemy.orm import exc"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ee33f25f","line":20,"updated":"2014-07-24 12:37:57.000000000","message":"Surprised that H302 didn\u0027t warn about this. The convention is to import the module, sql and then in the code use sql.and_.","commit_id":"7a2053c7a27bdec02e97b46736c5fcce5f2d053a"}],"neutron/tests/unit/test_db_plugin.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76d6582ec6d28dfbc280e648a77bdfafd606861e","unresolved":false,"context_lines":[{"line_number":2238,"context_line":"                self.assertEqual(res[\u0027network\u0027][\u0027admin_state_up\u0027], v[1])"},{"line_number":2239,"context_line":""},{"line_number":2240,"context_line":""},{"line_number":2241,"context_line":"class TestNetworksDirectly(NeutronDbPluginV2TestCase):"},{"line_number":2242,"context_line":"    def _create_network(self, plugin, ctx, shared\u003dTrue):"},{"line_number":2243,"context_line":"        network \u003d {\u0027network\u0027: {\u0027name\u0027: \u0027net\u0027,"},{"line_number":2244,"context_line":"                               \u0027shared\u0027: shared,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_3859bd36","line":2241,"updated":"2014-05-29 08:49:31.000000000","message":"pedantry: consider creating a new module for this unit test case.\nthe reason is that nobody will probably even notice the presence of this 50 lines in a 5k lines source code modules.\n\nAs it conceptually stands out from the others it is better to not get it lost.\n\nAlso - I\u0027m not sure about the name, but this is purely subjective.\nI would pick:\nTestNetworksPluginLevel\n\nFinally: this is outside the scope of your patch, but have you considered non inheriting from NeutronDbPluginV2TestCase which sets up a lot of stuff you\u0027re not using anyway in your tests, such as the API router?","commit_id":"5cc1fe017caaca45d0ebc493f4c656d8aabaac2a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"f9150115150c0d472ddc97cfafb06d4aa506e763","unresolved":false,"context_lines":[{"line_number":2238,"context_line":"                self.assertEqual(res[\u0027network\u0027][\u0027admin_state_up\u0027], v[1])"},{"line_number":2239,"context_line":""},{"line_number":2240,"context_line":""},{"line_number":2241,"context_line":"class TestNetworksDirectly(NeutronDbPluginV2TestCase):"},{"line_number":2242,"context_line":"    def _create_network(self, plugin, ctx, shared\u003dTrue):"},{"line_number":2243,"context_line":"        network \u003d {\u0027network\u0027: {\u0027name\u0027: \u0027net\u0027,"},{"line_number":2244,"context_line":"                               \u0027shared\u0027: shared,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_f9a3859b","line":2241,"in_reply_to":"3ae8d1ca_3859bd36","updated":"2014-07-13 17:14:12.000000000","message":"\u003e pedantry: consider creating a new module for this unit test case. the reason is that nobody will probably even notice the presence of this 50 lines in a 5k lines source code modules.\n\n\u003e As it conceptually stands out from the others it is better to not get it lost.\n\nDone. Moved to a new module, not sure about it\u0027s name so open for better suggestions.\n\n\u003e Also - I\u0027m not sure about the name, but this is purely subjective. I would pick: TestNetworksPluginLevel\n\nI think this should be somehow reflected in the new module name.\n\n\u003e Finally: this is outside the scope of your patch, but have you considered non inheriting from NeutronDbPluginV2TestCase which sets up a lot of stuff you\u0027re not using anyway in your tests, such as the API router?\n\nDone. You\u0027ll notice I managed to use the basic test with minimal setup code that\u0027s necessary for these tests to function.\n\nI don\u0027t intend to create a \"framework\" for unit tests here, but it\u0027s clearly missing. Hopefully this patch would be a setting stone, or inspiration for the more extensive work that needs to be done in this area.","commit_id":"5cc1fe017caaca45d0ebc493f4c656d8aabaac2a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"76d6582ec6d28dfbc280e648a77bdfafd606861e","unresolved":false,"context_lines":[{"line_number":2281,"context_line":"                          self._tenant_id + \u00271\u0027)"},{"line_number":2282,"context_line":""},{"line_number":2283,"context_line":"        network[\u0027network\u0027][\u0027shared\u0027] \u003d False"},{"line_number":2284,"context_line":"        plugin.update_network(ctx, net_id, network)"},{"line_number":2285,"context_line":""},{"line_number":2286,"context_line":"    def test_update_shared_net_used_as_router_gateway(self):"},{"line_number":2287,"context_line":"        self._test_update_shared_net_used_passes("}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_b8e86d11","line":2284,"updated":"2014-05-29 08:49:31.000000000","message":"more pedantry. This method and the previous have a lot in common. consider merging them - with a conditional on ExpectedException for the failure case","commit_id":"5cc1fe017caaca45d0ebc493f4c656d8aabaac2a"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"f9150115150c0d472ddc97cfafb06d4aa506e763","unresolved":false,"context_lines":[{"line_number":2281,"context_line":"                          self._tenant_id + \u00271\u0027)"},{"line_number":2282,"context_line":""},{"line_number":2283,"context_line":"        network[\u0027network\u0027][\u0027shared\u0027] \u003d False"},{"line_number":2284,"context_line":"        plugin.update_network(ctx, net_id, network)"},{"line_number":2285,"context_line":""},{"line_number":2286,"context_line":"    def test_update_shared_net_used_as_router_gateway(self):"},{"line_number":2287,"context_line":"        self._test_update_shared_net_used_passes("}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_79b775d8","line":2284,"in_reply_to":"3ae8d1ca_b8e86d11","updated":"2014-07-13 17:14:12.000000000","message":"Done.\n\nI didn\u0027t know if it\u0027s an acceptable practice or not.\nHopefully the altered code is up to par now.","commit_id":"5cc1fe017caaca45d0ebc493f4c656d8aabaac2a"}],"neutron/tests/unit/test_l3_plugin.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"19f7d1d247abf6ec9f12ee5fab370f322f7c7279","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"                                              s[\u0027subnet\u0027][\u0027id\u0027],"},{"line_number":1565,"context_line":"                                              None)"},{"line_number":1566,"context_line":""},{"line_number":1567,"context_line":"    def test_update_network_used_as_gateway_set_not_shared(self):"},{"line_number":1568,"context_line":"        with self.network(shared\u003dTrue) as network:"},{"line_number":1569,"context_line":"            with self.subnet(network\u003dnetwork) as s1:"},{"line_number":1570,"context_line":"                with self.router() as r:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2F09E%3D","line":1567,"updated":"2014-04-25 23:47:57.000000000","message":"Would it be possible to add a test that focuses on the change in question?  This is essentially a functional test where a unit test would probably do.","commit_id":"d823644613394ab17456468fb6269f42a8bc20ec"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"2bbcec0056e4192ef9b044e86719fe6a6de3d536","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"                                              s[\u0027subnet\u0027][\u0027id\u0027],"},{"line_number":1565,"context_line":"                                              None)"},{"line_number":1566,"context_line":""},{"line_number":1567,"context_line":"    def test_update_network_used_as_gateway_set_not_shared(self):"},{"line_number":1568,"context_line":"        with self.network(shared\u003dTrue) as network:"},{"line_number":1569,"context_line":"            with self.subnet(network\u003dnetwork) as s1:"},{"line_number":1570,"context_line":"                with self.router() as r:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5adbc538_a0415e0d","line":1567,"in_reply_to":"AAAAXX%2F%2F09E%3D","updated":"2014-05-26 13:22:02.000000000","message":"Done. Replaced with tests that avoid the REST API calls.","commit_id":"d823644613394ab17456468fb6269f42a8bc20ec"}]}
