)]}'
{"neutron/tests/tempest/api/admin/test_networks.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"363621a30ffd10d33a44725df7caafc85e1f6721","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from tempest import test"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron._i18n import _"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.tests.tempest.api import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_cc69b427","line":18,"updated":"2016-09-20 04:51:07.000000000","message":"Please remove a line.","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"622ced067adc8cc17e5f9f066fa9c7e9be247d98","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from tempest import test"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron._i18n import _"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.tests.tempest.api import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_7a2bbdeb","line":18,"in_reply_to":"7a8ec9b2_2a41f139","updated":"2016-09-20 20:37:50.000000000","message":"I don\u0027t believe it is a defined rule, nor written down anywhere. I just *think* it is OK, because the hacking test just checks the alphabetical order among contiguous lines of imports. I can\u0027t find any existing examples though.","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"e8ca525b3c30ec9f683f38404107d554be036119","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from tempest import test"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron._i18n import _"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.tests.tempest.api import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_2a41f139","line":18,"in_reply_to":"7a8ec9b2_abe7d13e","updated":"2016-09-20 15:20:10.000000000","message":"Sorry, I didn\u0027t know such rule. I wonder if you could tell me a link or something where such rule is written? I\u0027d like to know it for review after this.","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0341fe37b4da99d233332a629bfc180903f86c71","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from tempest import test"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron._i18n import _"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.tests.tempest.api import base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_abe7d13e","line":18,"in_reply_to":"7a8ec9b2_cc69b427","updated":"2016-09-20 13:06:06.000000000","message":"I think it is OK to separate neutron tests imports from neutron non-tests imports, but I am going to remove the translation because it seems it is not needed in the gate.","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"84630486ffa6ba09ae6ddd1952d017ff9f5c22b4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":69,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":70,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":71,"context_line":"        expected_message \u003d _(\"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\")"},{"line_number":72,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_c8952789","line":71,"updated":"2016-09-19 22:43:34.000000000","message":"sorry I meant, what if the message you get in \u0027e\u0027 is translated. This won\u0027t match would it?","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8c242fb2d4f50897ab4f2837cb499fdc40d06aed","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":69,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":70,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":71,"context_line":"        expected_message \u003d _(\"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\")"},{"line_number":72,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_b7b4b6d1","line":71,"in_reply_to":"7a8ec9b2_a8161b53","updated":"2016-09-20 02:53:31.000000000","message":"As I said in my previous comment, assertRaises is by far the most used assertion in tempest when checking for an exception. After seeing these comments, though, I checked the tempest repo for instances of \u0027var \u003d self.assertRaises(...\u0027. There are only 11 cases. A couple of those can be found in a security groups test case: https://github.com/openstack/tempest/blob/master/tempest/api/network/test_security_groups_negative.py#L136\n\nAs you can see, the message in the exceptions is checked without any translation. This test case is executed in our gate-tempest-dsvm-neutron-full-ubuntu-xenial job without any problems. Here\u0027s an example:\n\nhttp://logs.openstack.org/92/367192/3/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/72663df/console.html.gz#_2016-09-09_09_49_11_115108","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"33a54c8915c657b572856ecdb3a030d05d4b6d5d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":69,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":70,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":71,"context_line":"        expected_message \u003d _(\"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\")"},{"line_number":72,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_a8161b53","line":71,"in_reply_to":"7a8ec9b2_a871bbe2","updated":"2016-09-19 23:23:12.000000000","message":"it\u0027s probably a non-issue, this surely won\u0027t happen in the gate.","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5f98b63222929a95b3bedacaacd90ffa09b26903","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":69,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":70,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":71,"context_line":"        expected_message \u003d _(\"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\")"},{"line_number":72,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_a871bbe2","line":71,"in_reply_to":"7a8ec9b2_c8952789","updated":"2016-09-19 23:19:40.000000000","message":"Well I kind of assumed that one would test Vulcan neutron with Vulcan tempest and the two strings would get the same translation. But I am probably assuming too much. Should skip the message content check?","commit_id":"8c793da08e6078358b82fe8e0688bd2132e6e6d5"}],"neutron/tests/tempest/api/test_networks.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a2c210ffed850a57eb3a1ce48d4e888bf8295d67","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from oslo_utils import uuidutils"},{"line_number":17,"context_line":"from tempest.lib import exceptions as lib_exc"},{"line_number":18,"context_line":"from tempest import test"},{"line_number":19,"context_line":"import testtools"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.tests.tempest.api import base"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_c9e454ae","line":19,"updated":"2016-09-19 19:09:34.000000000","message":"If you follow my suggestion to L207, we don\u0027t need this","commit_id":"60348a7d27cc6a433ceb3540714888ea44d6aa60"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a2c210ffed850a57eb3a1ce48d4e888bf8295d67","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        other_tenant \u003d uuidutils.generate_uuid()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        name \u003d \u0027created-with-project-and-other-tenant\u0027"},{"line_number":207,"context_line":"        with testtools.ExpectedException(lib_exc.BadRequest):"},{"line_number":208,"context_line":"            self.admin_client.create_network_keystone_v3("},{"line_number":209,"context_line":"                name, project_id, tenant_id\u003dother_tenant)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_89da4ce8","line":207,"updated":"2016-09-19 19:09:34.000000000","message":"Consider the following option, which I think is more easily readable:\n\ne \u003d self.assertRaises(lib_exc.BadRequest,\n    self.admin_client.create_network_keystone_v3,\n    name, project_id, tenant_id\u003dother_tenant)\n\nYou can then do an assertion like:\n\nexpected_message \u003d \"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\"\nself.assertEqual(expected_message, e.resp_body[\u0027message\u0027])\n\nAnd you save the import of testtools","commit_id":"60348a7d27cc6a433ceb3540714888ea44d6aa60"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"af3d1e7b3f01ba06bd1a405e33fcc8e42bb5ea39","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        other_tenant \u003d uuidutils.generate_uuid()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        name \u003d \u0027created-with-project-and-other-tenant\u0027"},{"line_number":207,"context_line":"        with testtools.ExpectedException(lib_exc.BadRequest):"},{"line_number":208,"context_line":"            self.admin_client.create_network_keystone_v3("},{"line_number":209,"context_line":"                name, project_id, tenant_id\u003dother_tenant)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_58ce4cb5","line":207,"in_reply_to":"7a8ec9b2_89888cc8","updated":"2016-09-19 21:08:02.000000000","message":"Yeah, I should know this. Thanks.","commit_id":"60348a7d27cc6a433ceb3540714888ea44d6aa60"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"78b3f7f0307ab07de33a4cf0d9c3439ec5102cba","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        other_tenant \u003d uuidutils.generate_uuid()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        name \u003d \u0027created-with-project-and-other-tenant\u0027"},{"line_number":207,"context_line":"        with testtools.ExpectedException(lib_exc.BadRequest):"},{"line_number":208,"context_line":"            self.admin_client.create_network_keystone_v3("},{"line_number":209,"context_line":"                name, project_id, tenant_id\u003dother_tenant)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_89888cc8","line":207,"in_reply_to":"7a8ec9b2_89da4ce8","updated":"2016-09-19 19:11:00.000000000","message":"For what is worth, this pattern has 580+ occurrences in the tempest code base. testtools.ExpectedException has only a handful ;-)","commit_id":"60348a7d27cc6a433ceb3540714888ea44d6aa60"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3d52172490bcf6d4a1912c09de19dd53866753c0","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        _check_list_networks_fields([\u0027project_id\u0027, \u0027tenant_id\u0027], True, True)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class NetworksTestAdmin(base.BaseAdminNetworkTest):"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @test.idempotent_id(\u0027d3c76044-d067-4cb0-ae47-8cdd875c7f67\u0027)"},{"line_number":163,"context_line":"    @test.requires_ext(extension\u003d\"project-id\", service\u003d\"network\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_2274eafb","line":160,"updated":"2016-09-19 22:04:21.000000000","message":"don\u0027t mean to be rude, but these have a place under:\n\nhttps://github.com/openstack/neutron/tree/master/neutron/tests/tempest/api/admin","commit_id":"4740739b011a4393f2edac36e2d16a51b6001e08"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3fa5539d983eb443228252ee1882c2e8c846deae","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        _check_list_networks_fields([\u0027project_id\u0027, \u0027tenant_id\u0027], True, True)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class NetworksTestAdmin(base.BaseAdminNetworkTest):"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @test.idempotent_id(\u0027d3c76044-d067-4cb0-ae47-8cdd875c7f67\u0027)"},{"line_number":163,"context_line":"    @test.requires_ext(extension\u003d\"project-id\", service\u003d\"network\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_e53bec36","line":160,"in_reply_to":"7a8ec9b2_2274eafb","updated":"2016-09-19 22:22:38.000000000","message":"Done","commit_id":"4740739b011a4393f2edac36e2d16a51b6001e08"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3d52172490bcf6d4a1912c09de19dd53866753c0","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":207,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":208,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":209,"context_line":"        expected_message \u003d \"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\""},{"line_number":210,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_a5a9e4e1","line":209,"updated":"2016-09-19 22:04:21.000000000","message":"what if this is translated?","commit_id":"4740739b011a4393f2edac36e2d16a51b6001e08"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a2068ad96dffb54f920ee96254684adfd3985531","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":207,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":208,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":209,"context_line":"        expected_message \u003d \"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\""},{"line_number":210,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_e8abc3d4","line":209,"in_reply_to":"7a8ec9b2_0549b8d0","updated":"2016-09-19 22:42:51.000000000","message":"how did you do this?","commit_id":"4740739b011a4393f2edac36e2d16a51b6001e08"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3fa5539d983eb443228252ee1882c2e8c846deae","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        e \u003d self.assertRaises(lib_exc.BadRequest,"},{"line_number":207,"context_line":"                              self.admin_client.create_network_keystone_v3,"},{"line_number":208,"context_line":"                              name, project_id, tenant_id\u003dother_tenant)"},{"line_number":209,"context_line":"        expected_message \u003d \"\u0027project_id\u0027 and \u0027tenant_id\u0027 do not match\""},{"line_number":210,"context_line":"        self.assertEqual(expected_message, e.resp_body[\u0027message\u0027])"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_0549b8d0","line":209,"in_reply_to":"7a8ec9b2_a5a9e4e1","updated":"2016-09-19 22:22:38.000000000","message":"Done","commit_id":"4740739b011a4393f2edac36e2d16a51b6001e08"}]}
