)]}'
{"nova/api/openstack/placement/util.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2e799c993eb61cf85ebdebb426fba4b004cb0a5c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                if not best_match:"},{"line_number":38,"context_line":"                    type_string \u003d \u0027, \u0027.join(types)"},{"line_number":39,"context_line":"                    raise webob.exc.HTTPNotAcceptable("},{"line_number":40,"context_line":"                        \u0027Only %s is provided\u0027 % type_string,"},{"line_number":41,"context_line":"                        json_formatter\u003djson_error_formatter)"},{"line_number":42,"context_line":"            return f(req)"},{"line_number":43,"context_line":"        return decorated_function"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_6af34174","line":40,"range":{"start_line":40,"start_character":25,"end_line":40,"end_character":44},"updated":"2016-08-09 06:41:57.000000000","message":"so we needn\u0027t the translation marker for now?","commit_id":"3681ce356d20218f43026337b2bc813446a4e4cc"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fadc07f2ffb2b48b4603c3b5ee2df9bee738778b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                if not best_match:"},{"line_number":38,"context_line":"                    type_string \u003d \u0027, \u0027.join(types)"},{"line_number":39,"context_line":"                    raise webob.exc.HTTPNotAcceptable("},{"line_number":40,"context_line":"                        \u0027Only %s is provided\u0027 % type_string,"},{"line_number":41,"context_line":"                        json_formatter\u003djson_error_formatter)"},{"line_number":42,"context_line":"            return f(req)"},{"line_number":43,"context_line":"        return decorated_function"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_fea1a5aa","line":40,"in_reply_to":"9ad45d7e_6af34174","updated":"2016-08-09 11:25:20.000000000","message":"Currently there are no mechanisms anywhere in the placement api for translation (in the already merged code, the patches up for review, or the works in progress).\n\nThe thinking is that we can do that a separate follow up process.\n\nI would guess that at least one good reason for it having been done like that is because I\u0027ll need to collaborate with someone to figure out how best to make it happen and to learn the normal ways it is done in the openstack universe.","commit_id":"3681ce356d20218f43026337b2bc813446a4e4cc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"548b8dbb17b4fafc4d5de1a1776096771913713c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                if not best_match:"},{"line_number":38,"context_line":"                    type_string \u003d \u0027, \u0027.join(types)"},{"line_number":39,"context_line":"                    raise webob.exc.HTTPNotAcceptable("},{"line_number":40,"context_line":"                        \u0027Only %s is provided\u0027 % type_string,"},{"line_number":41,"context_line":"                        json_formatter\u003djson_error_formatter)"},{"line_number":42,"context_line":"            return f(req)"},{"line_number":43,"context_line":"        return decorated_function"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_695e6e77","line":40,"in_reply_to":"9ad45d7e_fea1a5aa","updated":"2016-08-10 07:42:07.000000000","message":"ok, just ensure if there any plan, but this probably not very important for now.","commit_id":"3681ce356d20218f43026337b2bc813446a4e4cc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"0839f85ea8d6596d1d3e606328b79ec5ba086293","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        def decorated_function(req):"},{"line_number":84,"context_line":"            if req.content_type !\u003d content_type:"},{"line_number":85,"context_line":"                # webob\u0027s unset content_type is the empty string so"},{"line_number":86,"context_line":"                # set it the error message content to \u0027None\u0027 to make"},{"line_number":87,"context_line":"                # a useful message in that case."},{"line_number":88,"context_line":"                raise webob.exc.HTTPUnsupportedMediaType("},{"line_number":89,"context_line":"                    \u0027The media type %s is not supported, use %s\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_02a840da","line":86,"range":{"start_line":86,"start_character":18,"end_line":86,"end_character":28},"updated":"2016-08-10 21:17:40.000000000","message":"set the","commit_id":"c159b75505a163279e559f95141fa194617ecad8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b6e7835bc2ef0985f163822dc98e836520bfb2f7","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        def decorated_function(req):"},{"line_number":84,"context_line":"            if req.content_type !\u003d content_type:"},{"line_number":85,"context_line":"                # webob\u0027s unset content_type is the empty string so"},{"line_number":86,"context_line":"                # set it the error message content to \u0027None\u0027 to make"},{"line_number":87,"context_line":"                # a useful message in that case."},{"line_number":88,"context_line":"                raise webob.exc.HTTPUnsupportedMediaType("},{"line_number":89,"context_line":"                    \u0027The media type %s is not supported, use %s\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_02ea00ac","line":86,"in_reply_to":"9ad45d7e_02a840da","updated":"2016-08-10 21:25:57.000000000","message":"I\u0027ll get this tomorrow morning unless it manages to merge before then.","commit_id":"c159b75505a163279e559f95141fa194617ecad8"}],"nova/tests/unit/api/openstack/placement/test_util.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"0839f85ea8d6596d1d3e606328b79ec5ba086293","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        error \u003d self.assertRaises(webob.exc.HTTPNotAcceptable,"},{"line_number":36,"context_line":"                                  self.handler, req)"},{"line_number":37,"context_line":"        self.assertEqual("},{"line_number":38,"context_line":"            \u0027Only application/json, application/vnd.openstack is provided\u0027,"},{"line_number":39,"context_line":"            str(error))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def test_fail_complex_no_match(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_c23d8890","line":38,"updated":"2016-08-10 21:17:40.000000000","message":"This is fragile. A slight tweak in the wording will break the test. Checking that the types are in the error message would be better, IMO. The same comment applies to all the other tests below that check an exact string.","commit_id":"c159b75505a163279e559f95141fa194617ecad8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b6e7835bc2ef0985f163822dc98e836520bfb2f7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        error \u003d self.assertRaises(webob.exc.HTTPNotAcceptable,"},{"line_number":36,"context_line":"                                  self.handler, req)"},{"line_number":37,"context_line":"        self.assertEqual("},{"line_number":38,"context_line":"            \u0027Only application/json, application/vnd.openstack is provided\u0027,"},{"line_number":39,"context_line":"            str(error))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def test_fail_complex_no_match(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_e27a4cf0","line":38,"in_reply_to":"9ad45d7e_c23d8890","updated":"2016-08-10 21:25:57.000000000","message":"Interesting. Given the nature of what this test is testing I would expect a slight tweak in the wording to break the test. That\u0027s what the test is there for: if the code changes the test should break. Then you can inspect the failure and, as a human making decisions based on complex contexts, decide whether to fix the test or fix the code.\n\nIt sounds like you\u0027re coming at this from a different angle. If you could explain that angle to me, that would be great.","commit_id":"c159b75505a163279e559f95141fa194617ecad8"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"60f9d23be6358ff137023360abd90aef32226bc6","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        error \u003d self.assertRaises(webob.exc.HTTPNotAcceptable,"},{"line_number":36,"context_line":"                                  self.handler, req)"},{"line_number":37,"context_line":"        self.assertEqual("},{"line_number":38,"context_line":"            \u0027Only application/json, application/vnd.openstack is provided\u0027,"},{"line_number":39,"context_line":"            str(error))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def test_fail_complex_no_match(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_017bf928","line":38,"in_reply_to":"9ad45d7e_e27a4cf0","updated":"2016-08-11 13:12:07.000000000","message":"I\u0027m good with exact string checking here","commit_id":"c159b75505a163279e559f95141fa194617ecad8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1beca8243ae4a9295248b4003938cdcf8b4d4cf7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        error \u003d self.assertRaises(webob.exc.HTTPNotAcceptable,"},{"line_number":36,"context_line":"                                  self.handler, req)"},{"line_number":37,"context_line":"        self.assertEqual("},{"line_number":38,"context_line":"            \u0027Only application/json, application/vnd.openstack is provided\u0027,"},{"line_number":39,"context_line":"            str(error))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def test_fail_complex_no_match(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_c0d1d224","line":38,"in_reply_to":"9ad45d7e_e27a4cf0","updated":"2016-08-11 15:39:22.000000000","message":"OK, let\u0027s say that the error string is changed to say \"are provided\" instead of \"is provided\" if there is more than one type, since the singular \"is\" is not grammatically correct. I know, that\u0027s a minor thing, but I\u0027m trying to provide an example using this particular case. The test will break, and not because the code isn\u0027t working properly.\n\nI simply prefer tests that break when the functional logic changes, not when something inconsequential does. The important thing here is that the expected types are in the string, not the exact wording of the string itself. So if the change no longer provided the correct types in the error message, the test should break, but not because someone felt the wording could be made nicer.","commit_id":"c159b75505a163279e559f95141fa194617ecad8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b51abd4ec001db875bb013fc5487aa69da9ec84d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def test_success_content_type(self):"},{"line_number":100,"context_line":"        req \u003d webob.Request.blank(\u0027/\u0027)"},{"line_number":101,"context_line":"        req.content_type \u003d \u0027application/json\u0027"},{"line_number":102,"context_line":"        self.assertTrue(self.handler(req))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_876722b6","line":102,"updated":"2016-08-10 20:55:48.000000000","message":"Excellent, comprehensive unit tests. ++","commit_id":"c159b75505a163279e559f95141fa194617ecad8"}]}
