)]}'
{"cinder/tests/unit/api/test_versions.py":[{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"35c0010b8205bfe23bfef1f12a313eb5d08d4d12","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.assertEqual(\u00273.0\u0027, _get_str_version(index.start_version))"},{"line_number":197,"context_line":"        self.assertEqual(\u0027None.None\u0027, _get_str_version(index.end_version))"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        # Same thing will happen with the Controller class, thus confirming"},{"line_number":200,"context_line":"        # that we don\u0027t cross pollinate our classes with undesired methods."},{"line_number":201,"context_line":"        self.assertListEqual([\u0027index\u0027], list(Controller.versioned_methods))"},{"line_number":202,"context_line":"        self.assertEqual(1, len(Controller.versioned_methods[\u0027index\u0027]))"},{"line_number":203,"context_line":"        index \u003d Controller.versioned_methods[\u0027index\u0027][0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_551d970d","line":200,"range":{"start_line":199,"start_character":8,"end_line":200,"end_character":75},"updated":"2016-07-01 06:35:36.000000000","message":"+1","commit_id":"d972f0c87bc954572984aa5c9876f94cc53c9dd9"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"89b6eae4b5dcbab9ff87d82afdd516e55e4c2c72","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        # ControllerChild will inherit index method from ControllerParent and"},{"line_number":210,"context_line":"        # add its own version as well as add a new method"},{"line_number":211,"context_line":"        self.assertListEqual([\u0027index\u0027, \u0027new_method\u0027],"},{"line_number":212,"context_line":"                             list(ControllerChild.versioned_methods))"},{"line_number":213,"context_line":"        self.assertEqual(2, len(ControllerChild.versioned_methods[\u0027index\u0027]))"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # The methods are ordered from newest version to oldest version"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_a2bda3b2","line":212,"updated":"2016-07-01 05:48:07.000000000","message":"list(ControllerChild.versioned_methods) has different results in python2 and python3. As a result, it leads python3 fail.\n\nSeems we can use assertSetEqual here.","commit_id":"d972f0c87bc954572984aa5c9876f94cc53c9dd9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f8ce02dd11fabbfafd238cb8750783a47943bbb","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        # ControllerChild will inherit index method from ControllerParent and"},{"line_number":210,"context_line":"        # add its own version as well as add a new method"},{"line_number":211,"context_line":"        self.assertListEqual([\u0027index\u0027, \u0027new_method\u0027],"},{"line_number":212,"context_line":"                             list(ControllerChild.versioned_methods))"},{"line_number":213,"context_line":"        self.assertEqual(2, len(ControllerChild.versioned_methods[\u0027index\u0027]))"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # The methods are ordered from newest version to oldest version"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_ee3034a0","line":212,"in_reply_to":"3aaa91ec_a2bda3b2","updated":"2016-07-01 08:04:30.000000000","message":"Yep, I didn\u0027t take into account the hash randomization in Python 3, and I was unlucky enough that it run fine locally so I didn\u0027t catch it.","commit_id":"d972f0c87bc954572984aa5c9876f94cc53c9dd9"},{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"35c0010b8205bfe23bfef1f12a313eb5d08d4d12","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @ddt.data([\u00273.5\u0027, 200], [\u00273.55\u0027, 404])"},{"line_number":295,"context_line":"    @ddt.unpack"},{"line_number":296,"context_line":"    def test_req_version_matches(self, version, HTTP_ret):"},{"line_number":297,"context_line":"        version_request \u003d api_version_request.APIVersionRequest(version)"},{"line_number":298,"context_line":"        self.mock_object(api_version_request,"},{"line_number":299,"context_line":"                         \u0027max_api_version\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_956fff5e","line":296,"range":{"start_line":296,"start_character":8,"end_line":296,"end_character":32},"updated":"2016-07-01 06:35:36.000000000","message":"I also suggestion to add a new unit test similar to this one.\nAnd in fact I use these code to review this patch:\n\n    @ddt.data([\u00273.0\u0027, \u0027parent\u0027], [\u00273.1\u0027, \u0027old-child\u0027], [\u00273.5\u0027, \u0027new-child\u0027])\n    @ddt.unpack\n    def test_versions_of_grandchild_controller(self, version, HTTP_ret):\n        version_request \u003d api_version_request.APIVersionRequest(version)\n        self.mock_object(api_version_request,\n                         \u0027max_api_version\u0027,\n                         mock.Mock(return_value\u003dversion_request))\n\n        class ParentController(wsgi.Controller):\n\n            @wsgi.Controller.api_version(\u00272.0\u0027, \u00273.0\u0027)\n            def index(self, req):\n                return \u0027parent\u0027\n\n        class ChildController(ParentController):\n\n            @wsgi.Controller.api_version(\u00273.1\u0027, \u00273.3\u0027)\n            def index(self, req):\n                return \u0027old-child\u0027\n\n            @wsgi.Controller.api_version(\u00273.4\u0027)\n            def index(self, req):\n                return \u0027new-child\u0027\n\n        req \u003d self.build_request(base_dir\u003d\u0027/tests\u0027, header_version\u003dversion)\n        app \u003d fakes.TestRouter(ChildController())\n\n        response \u003d req.get_response(app)\n        resp \u003d encodeutils.safe_decode(response.body, incoming\u003d\u0027utf-8\u0027)\n\n        self.assertEqual(HTTP_ret, resp)","commit_id":"d972f0c87bc954572984aa5c9876f94cc53c9dd9"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"dfd86036a4bcbaf4b74aecd5fab46c3e3e6b5ee0","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @ddt.data([\u00273.5\u0027, 200], [\u00273.55\u0027, 404])"},{"line_number":295,"context_line":"    @ddt.unpack"},{"line_number":296,"context_line":"    def test_req_version_matches(self, version, HTTP_ret):"},{"line_number":297,"context_line":"        version_request \u003d api_version_request.APIVersionRequest(version)"},{"line_number":298,"context_line":"        self.mock_object(api_version_request,"},{"line_number":299,"context_line":"                         \u0027max_api_version\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_d8cb7e1c","line":296,"range":{"start_line":296,"start_character":8,"end_line":296,"end_character":32},"in_reply_to":"3aaa91ec_956fff5e","updated":"2016-07-01 07:16:49.000000000","message":"I think Gorka\u0027s unit tests are more detailed and focused.","commit_id":"d972f0c87bc954572984aa5c9876f94cc53c9dd9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f8ce02dd11fabbfafd238cb8750783a47943bbb","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @ddt.data([\u00273.5\u0027, 200], [\u00273.55\u0027, 404])"},{"line_number":295,"context_line":"    @ddt.unpack"},{"line_number":296,"context_line":"    def test_req_version_matches(self, version, HTTP_ret):"},{"line_number":297,"context_line":"        version_request \u003d api_version_request.APIVersionRequest(version)"},{"line_number":298,"context_line":"        self.mock_object(api_version_request,"},{"line_number":299,"context_line":"                         \u0027max_api_version\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_8ed09020","line":296,"range":{"start_line":296,"start_character":8,"end_line":296,"end_character":32},"in_reply_to":"3aaa91ec_956fff5e","updated":"2016-07-01 08:04:30.000000000","message":"Initially I started writing the test like that, but then I realized that in these testcases it makes sense to check the internal structures to make sure they have the data that we expect, as we are already testing the use of those structures in the other tests.\n\nBut since it doesn\u0027t cost anything to add a new tests and it makes kind of sense to have one like the others we already have.  :-)","commit_id":"d972f0c87bc954572984aa5c9876f94cc53c9dd9"},{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"dba76e9c122de5dd01a289ece03b13418bf25570","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            self.assertEqual(200, response.status_int)"},{"line_number":309,"context_line":"            self.assertEqual(expected, resp)"},{"line_number":310,"context_line":"        else:"},{"line_number":311,"context_line":"            # import pdb; pdb.set_trace()"},{"line_number":312,"context_line":"            self.assertEqual(expected, response.status_int)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def test_versions_version_not_found(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_4972f6e6","line":311,"range":{"start_line":311,"start_character":12,"end_line":311,"end_character":41},"updated":"2016-07-04 01:46:27.000000000","message":"We don\u0027t need this comment,IMO","commit_id":"6b4d8f790a82bcb78f0122daf1815f0824951eaf"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"4ce61474afa5a4a9e503ba0459a58f481f64f95f","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            self.assertEqual(200, response.status_int)"},{"line_number":309,"context_line":"            self.assertEqual(expected, resp)"},{"line_number":310,"context_line":"        else:"},{"line_number":311,"context_line":"            # import pdb; pdb.set_trace()"},{"line_number":312,"context_line":"            self.assertEqual(expected, response.status_int)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def test_versions_version_not_found(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_245f9642","line":311,"range":{"start_line":311,"start_character":12,"end_line":311,"end_character":41},"in_reply_to":"1aa78d24_4972f6e6","updated":"2016-07-05 09:06:21.000000000","message":"LOL, yeah we certainly don\u0027t want this here.  And that\u0027s a -1 right there.  :-)","commit_id":"6b4d8f790a82bcb78f0122daf1815f0824951eaf"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"7c5e3831fc86b26fd80b748489fd01294d8bf93a","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            def index(self, req):"},{"line_number":288,"context_line":"                return \u0027child 3.2\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            # TODO(geguileo): Figure out a way to make microversions work in a"},{"line_number":291,"context_line":"            # way that doesn\u0027t raise complaints from duplicated method."},{"line_number":292,"context_line":"            @wsgi.Controller.api_version(\u00273.3\u0027)  # noqa"},{"line_number":293,"context_line":"            def index(self, req):"},{"line_number":294,"context_line":"                return \u0027child 3.3\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_5c1de464","line":291,"range":{"start_line":290,"start_character":0,"end_line":291,"end_character":71},"updated":"2016-07-07 07:23:51.000000000","message":"You could allow the method to be called index_3_3(...) and have the decorator do more magic, maybe?","commit_id":"115bd826c28e2f7a40c8b05fcf637e148e45d199"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"1ae7c74590ee3a99b291d3babd17e2385cb9d76d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            def index(self, req):"},{"line_number":288,"context_line":"                return \u0027child 3.2\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            # TODO(geguileo): Figure out a way to make microversions work in a"},{"line_number":291,"context_line":"            # way that doesn\u0027t raise complaints from duplicated method."},{"line_number":292,"context_line":"            @wsgi.Controller.api_version(\u00273.3\u0027)  # noqa"},{"line_number":293,"context_line":"            def index(self, req):"},{"line_number":294,"context_line":"                return \u0027child 3.3\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_6266292b","line":291,"range":{"start_line":290,"start_character":0,"end_line":291,"end_character":71},"in_reply_to":"1aa78d24_3f155d9b","updated":"2016-07-07 11:21:46.000000000","message":"I have decided to go with a more standard approach in my patch [1] and use \"@index.api_version(\u00273.3\u0027)\" instead.\n\nhttps://review.openstack.org/#/c/338883/","commit_id":"115bd826c28e2f7a40c8b05fcf637e148e45d199"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0c5d4875b49ab982f98320a344f9c6a82d3591a2","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            def index(self, req):"},{"line_number":288,"context_line":"                return \u0027child 3.2\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            # TODO(geguileo): Figure out a way to make microversions work in a"},{"line_number":291,"context_line":"            # way that doesn\u0027t raise complaints from duplicated method."},{"line_number":292,"context_line":"            @wsgi.Controller.api_version(\u00273.3\u0027)  # noqa"},{"line_number":293,"context_line":"            def index(self, req):"},{"line_number":294,"context_line":"                return \u0027child 3.3\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_3f155d9b","line":291,"range":{"start_line":290,"start_character":0,"end_line":291,"end_character":71},"in_reply_to":"1aa78d24_5c1de464","updated":"2016-07-07 09:38:19.000000000","message":"Yes, that\u0027s what I was thinking as well, but that\u0027s a non related issue that we already have and that was just exposed by this test.  So I wanted to keep these 2 bugs separated.","commit_id":"115bd826c28e2f7a40c8b05fcf637e148e45d199"}]}
