)]}'
{"neutron/api/v2/resource.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"71b790f7ab290155de46b833ff5e787367c9b0e2","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        language \u003d request.best_match_language()"},{"line_number":78,"context_line":"        deserializer \u003d deserializers.get(content_type)"},{"line_number":79,"context_line":"        serializer \u003d serializers.get(content_type)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        def update_exception_structure(e_type, message, detail\u003d\u0027\u0027):"},{"line_number":82,"context_line":"            # the following structure is expected by python-neutronclient"},{"line_number":83,"context_line":"            err_data \u003d {\u0027type\u0027: e_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_ee8d0333","line":80,"updated":"2014-08-14 16:51:42.000000000","message":"\u0027update_xxx\u0027 implies that something is updated, when in fact a whole new object, \u0027err_data\u0027, is initialized and return. Maybe \u0027get_exception_data\u0027?","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9993e741cc03cd7290cd1dcd8ce1f0c4e04c0da4","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        language \u003d request.best_match_language()"},{"line_number":78,"context_line":"        deserializer \u003d deserializers.get(content_type)"},{"line_number":79,"context_line":"        serializer \u003d serializers.get(content_type)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        def update_exception_structure(e_type, message, detail\u003d\u0027\u0027):"},{"line_number":82,"context_line":"            # the following structure is expected by python-neutronclient"},{"line_number":83,"context_line":"            err_data \u003d {\u0027type\u0027: e_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_9e2ada7c","line":80,"in_reply_to":"7ac7a964_ee8d0333","updated":"2014-08-15 10:53:17.000000000","message":"Done","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"71b790f7ab290155de46b833ff5e787367c9b0e2","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        deserializer \u003d deserializers.get(content_type)"},{"line_number":79,"context_line":"        serializer \u003d serializers.get(content_type)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        def update_exception_structure(e_type, message, detail\u003d\u0027\u0027):"},{"line_number":82,"context_line":"            # the following structure is expected by python-neutronclient"},{"line_number":83,"context_line":"            err_data \u003d {\u0027type\u0027: e_type,"},{"line_number":84,"context_line":"                        \u0027message\u0027: message, \u0027detail\u0027: detail}"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_aec5cb5c","line":81,"updated":"2014-08-14 16:51:42.000000000","message":"Why not make this a staticmethod and define it outside the function (ie. at the class level?)","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9993e741cc03cd7290cd1dcd8ce1f0c4e04c0da4","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        deserializer \u003d deserializers.get(content_type)"},{"line_number":79,"context_line":"        serializer \u003d serializers.get(content_type)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        def update_exception_structure(e_type, message, detail\u003d\u0027\u0027):"},{"line_number":82,"context_line":"            # the following structure is expected by python-neutronclient"},{"line_number":83,"context_line":"            err_data \u003d {\u0027type\u0027: e_type,"},{"line_number":84,"context_line":"                        \u0027message\u0027: message, \u0027detail\u0027: detail}"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_be2156a1","line":81,"in_reply_to":"7ac7a964_aec5cb5c","updated":"2014-08-15 10:53:17.000000000","message":"Done","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"71b790f7ab290155de46b833ff5e787367c9b0e2","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            else:"},{"line_number":106,"context_line":"                LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":107,"context_line":"            e \u003d translate(e, language)"},{"line_number":108,"context_line":"            body \u003d serializer.serialize("},{"line_number":109,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":110,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":111,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_4ea3579e","line":108,"updated":"2014-08-14 16:51:42.000000000","message":"Perhaps change update_exception_structure() to receive only the exception instance (e)? That way the call to the function will be \"update_exception_structure(e)\" (much cleaner IMO).\n\nAlso, passing only \u0027e\u0027 doesn\u0027t prevent you from getting the __class__.__name__ attribute (since e already holds it), reduces code duplication (L131) and makes this function all that much simpler :)","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9993e741cc03cd7290cd1dcd8ce1f0c4e04c0da4","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            else:"},{"line_number":106,"context_line":"                LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":107,"context_line":"            e \u003d translate(e, language)"},{"line_number":108,"context_line":"            body \u003d serializer.serialize("},{"line_number":109,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":110,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":111,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_1e36cae7","line":108,"in_reply_to":"7ac7a964_4ea3579e","updated":"2014-08-15 10:53:17.000000000","message":"Done","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fdc79d0ba0e8ec68fdfee6fd3bb700b3cabf53fb","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":115,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":116,"context_line":"            translate(e, language)"},{"line_number":117,"context_line":"            value.body \u003d serializer.serialize("},{"line_number":118,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":119,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":120,"context_line":"            value.content_type \u003d content_type"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_79ee2d24","line":117,"updated":"2014-08-14 09:52:50.000000000","message":"Are we sure that e will be an instance of HTTPException? In general e can also be a subclass of HTTPException. Typically when you perform\n\n try\n   raise webob.exc.HTTPException # or subclass\n except webob.exc.HTTPException as e:\n   ...\n\nyou will get e \u003d\u003d webob.exc.HTTPException","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"960eb9d40e055f847e92a51a62828cdc94c6a1f4","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":115,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":116,"context_line":"            translate(e, language)"},{"line_number":117,"context_line":"            value.body \u003d serializer.serialize("},{"line_number":118,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":119,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":120,"context_line":"            value.content_type \u003d content_type"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_e4b52dce","line":117,"in_reply_to":"7ac7a964_21ce375b","updated":"2014-08-14 11:25:50.000000000","message":"The right test is issubclass(e, webob.exc.HTTPException)","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"b28e874ae091e93f7b620b16b8fe011ef29abad0","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":115,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":116,"context_line":"            translate(e, language)"},{"line_number":117,"context_line":"            value.body \u003d serializer.serialize("},{"line_number":118,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":119,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":120,"context_line":"            value.content_type \u003d content_type"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_21ce375b","line":117,"in_reply_to":"7ac7a964_79ee2d24","updated":"2014-08-14 11:05:39.000000000","message":"I am not sure about it. AFAIK, in the situation you described e will be an instance of a class it belongs to.  For example, if you perform\n\ntry:\n   raise webob.exc.exc.HTTPGatewayTimeout \nexcept webob.exc.HTTPException as e:\n    print  e \u003d\u003d webob.exc.HTTPException\n\nyou will get False\n\nAnd if you look into test_api_v2_resource, you will see that test_http_error checks it.","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"a8a3542776936091b922b21c2034a1e0d512b449","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":115,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":116,"context_line":"            translate(e, language)"},{"line_number":117,"context_line":"            value.body \u003d serializer.serialize("},{"line_number":118,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":119,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":120,"context_line":"            value.content_type \u003d content_type"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_fd585ffc","line":117,"in_reply_to":"7ac7a964_9504a516","updated":"2014-08-14 13:25:31.000000000","message":"To sum things up:\n\n\u003e\u003e\u003e Are we sure that e will be an instance of HTTPException\n\nYes, I\u0027m sure that e is an instance of HTTPException or its subclasses.","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"687df9ac4022541ccb984b554edef7b78cbf1028","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            type_, value, tb \u003d sys.exc_info()"},{"line_number":115,"context_line":"            LOG.exception(_(\u0027%s failed\u0027), action)"},{"line_number":116,"context_line":"            translate(e, language)"},{"line_number":117,"context_line":"            value.body \u003d serializer.serialize("},{"line_number":118,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":119,"context_line":"                    e.__class__.__name__, e)})"},{"line_number":120,"context_line":"            value.content_type \u003d content_type"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_9504a516","line":117,"in_reply_to":"7ac7a964_e4b52dce","updated":"2014-08-14 12:42:26.000000000","message":"I\u0027m afraid, I just don\u0027t get what you mean.\n\nissubclass(e, webob.exc.HTTPException) \u003c---here e is in instance and webob.exc.HTTPException is a class\n\nConsider this example:\n\n# Create class A\n\n\u003e\u003e\u003e class A(object):\n...     pass\n... \n\n# Create class B that inherits from A\n\n\u003e\u003e\u003e class B(A):\n...     pass\n...\n\n# Create an istance of class B \n\n\u003e\u003e\u003e b \u003d B()\n\n# Here b is an istance and A is a class\n\u003e\u003e\u003e issubclass(b, A)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: issubclass() arg 1 must be a class\n\n# Check if a class that b is an instance of is a subclass of A\n\n\u003e\u003e\u003e issubclass(b.__class__, A)\nTrue\n\n# Check if a class that b is an instance of is a subclass of B\n\n\u003e\u003e\u003e issubclass(b.__class__, B)\nTrue\n\n# Check if b is an instance of B\n\n\u003e\u003e\u003e isinstance(b, B)\nTrue\n\n# Check if b is an instance of A\n\n\u003e\u003e\u003e isinstance(b, A)\nTrue\n\nThus, we see that b is an instance of both class B and class A.","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"71b790f7ab290155de46b833ff5e787367c9b0e2","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                    \u0027processing your request.\u0027)"},{"line_number":141,"context_line":"            msg \u003d translate(msg, language)"},{"line_number":142,"context_line":"            body \u003d serializer.serialize("},{"line_number":143,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":144,"context_line":"                    webob.exc.HTTPInternalServerError.title, msg)})"},{"line_number":145,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":146,"context_line":"            raise webob.exc.HTTPInternalServerError(**kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_c4a663c1","line":143,"updated":"2014-08-14 16:51:42.000000000","message":"In addition to the comment I gave earlier regarding changing update_exception_structure,\nthis can be resolved by simply initialising an instance:\n\n update_exception_structure(HTTPInternalServerError(msg))\n\nShould probably work.","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"da4211421e9ce6f2d463cf4bb2c794507e66b7f5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                    \u0027processing your request.\u0027)"},{"line_number":141,"context_line":"            msg \u003d translate(msg, language)"},{"line_number":142,"context_line":"            body \u003d serializer.serialize("},{"line_number":143,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":144,"context_line":"                    webob.exc.HTTPInternalServerError.title, msg)})"},{"line_number":145,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":146,"context_line":"            raise webob.exc.HTTPInternalServerError(**kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_47e31c33","line":143,"in_reply_to":"7ac7a964_46da5379","updated":"2014-08-15 07:12:40.000000000","message":"Seeing as how this is an \u0027except Exception\u0027 block which shouldn\u0027t happen all that much often, I\u0027m not really that worried. If we are going through this code all that often, I think this function isn\u0027t all that good (with no regards to your new code :) ) and is in need of a re-think - what are the type of exceptions that normally get caught, and why aren\u0027t they handled in the (numerous) except blocks above?\n\nAnyways, this is Python and not C, so I really don\u0027t think we\u0027re worried about memory management to the level of another object every now and then. Do correct me if i\u0027m wrong..","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9993e741cc03cd7290cd1dcd8ce1f0c4e04c0da4","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                    \u0027processing your request.\u0027)"},{"line_number":141,"context_line":"            msg \u003d translate(msg, language)"},{"line_number":142,"context_line":"            body \u003d serializer.serialize("},{"line_number":143,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":144,"context_line":"                    webob.exc.HTTPInternalServerError.title, msg)})"},{"line_number":145,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":146,"context_line":"            raise webob.exc.HTTPInternalServerError(**kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_fe966e93","line":143,"in_reply_to":"7ac7a964_47e31c33","updated":"2014-08-15 10:53:17.000000000","message":"I can\u0027t say I know for sure how often is this \u0027except Exception\u0027 is executed, but I tend to agree with your reasoning:)","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"6a62972641eea7ade45d219b736ad35e9bb49178","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                    \u0027processing your request.\u0027)"},{"line_number":141,"context_line":"            msg \u003d translate(msg, language)"},{"line_number":142,"context_line":"            body \u003d serializer.serialize("},{"line_number":143,"context_line":"                {\u0027NeutronError\u0027: update_exception_structure("},{"line_number":144,"context_line":"                    webob.exc.HTTPInternalServerError.title, msg)})"},{"line_number":145,"context_line":"            kwargs \u003d {\u0027body\u0027: body, \u0027content_type\u0027: content_type}"},{"line_number":146,"context_line":"            raise webob.exc.HTTPInternalServerError(**kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_46da5379","line":143,"in_reply_to":"7ac7a964_c4a663c1","updated":"2014-08-14 19:08:31.000000000","message":"Your suggestions seem rational, but I am a bit concerned whether a slight reduce of code duplication is worth creating  an extra instance of HTTPInternalServerError each time we get into this except block?","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":11614,"name":"Koteswara Rao Kelam","email":"koteswara.kelam@hp.com","username":"koteswar"},"change_message_id":"ff95fe3427cba0f901a5a9b01683cc3515755d71","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    return resource"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def get_exception_data(e):"},{"line_number":153,"context_line":"    # the following structure is expected by python-neutronclient"},{"line_number":154,"context_line":"    err_data \u003d {\u0027type\u0027: e.__class__.__name__,"},{"line_number":155,"context_line":"                \u0027message\u0027: e, \u0027detail\u0027: \u0027\u0027}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_6505a8c1","line":152,"updated":"2014-08-18 07:41:43.000000000","message":"please add function description here.","commit_id":"2186c6561cfb13eb05d73dde2f10a637e2619e47"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"f0fa1b57bf31a63e4a7b8a0e3bf92bdb9215a9ed","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    return resource"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def get_exception_data(e):"},{"line_number":153,"context_line":"    # the following structure is expected by python-neutronclient"},{"line_number":154,"context_line":"    err_data \u003d {\u0027type\u0027: e.__class__.__name__,"},{"line_number":155,"context_line":"                \u0027message\u0027: e, \u0027detail\u0027: \u0027\u0027}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_194e19c2","line":152,"in_reply_to":"1abeadc6_6505a8c1","updated":"2014-08-18 09:45:04.000000000","message":"Done","commit_id":"2186c6561cfb13eb05d73dde2f10a637e2619e47"}],"neutron/tests/unit/test_api_v2_resource.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"71b790f7ab290155de46b833ff5e787367c9b0e2","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_unhandled_error_with_xml(self):"},{"line_number":302,"context_line":"        expected_res \u003d {\u0027body\u0027: {\u0027NeutronError\u0027:"},{"line_number":303,"context_line":"                                {\u0027detail\u0027: \u0027\u0027,"},{"line_number":304,"context_line":"                                 \u0027message\u0027: _("},{"line_number":305,"context_line":"                                     \u0027Request Failed: internal server \u0027"},{"line_number":306,"context_line":"                                     \u0027error while processing your request.\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_b78d1b34","line":303,"updated":"2014-08-14 16:51:42.000000000","message":"This whole \u0027body\u0027 dict is the same as defined in L282 onwards.. Maybe make this a shared attribute/constant?","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9993e741cc03cd7290cd1dcd8ce1f0c4e04c0da4","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_unhandled_error_with_xml(self):"},{"line_number":302,"context_line":"        expected_res \u003d {\u0027body\u0027: {\u0027NeutronError\u0027:"},{"line_number":303,"context_line":"                                {\u0027detail\u0027: \u0027\u0027,"},{"line_number":304,"context_line":"                                 \u0027message\u0027: _("},{"line_number":305,"context_line":"                                     \u0027Request Failed: internal server \u0027"},{"line_number":306,"context_line":"                                     \u0027error while processing your request.\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_bef4f6f2","line":303,"in_reply_to":"7ac7a964_6603cfb8","updated":"2014-08-15 10:53:17.000000000","message":"Done","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"6a62972641eea7ade45d219b736ad35e9bb49178","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def test_unhandled_error_with_xml(self):"},{"line_number":302,"context_line":"        expected_res \u003d {\u0027body\u0027: {\u0027NeutronError\u0027:"},{"line_number":303,"context_line":"                                {\u0027detail\u0027: \u0027\u0027,"},{"line_number":304,"context_line":"                                 \u0027message\u0027: _("},{"line_number":305,"context_line":"                                     \u0027Request Failed: internal server \u0027"},{"line_number":306,"context_line":"                                     \u0027error while processing your request.\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_6603cfb8","line":303,"in_reply_to":"7ac7a964_b78d1b34","updated":"2014-08-14 19:08:31.000000000","message":"You are right. I\u0027ll try to reduce code duplication in test_unhandled_error_with_* and test_not_implemented_error_with_* in the next patchset.","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"71b790f7ab290155de46b833ff5e787367c9b0e2","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.assertEqual(expected_res,"},{"line_number":338,"context_line":"                         wsgi.JSONDeserializer().deserialize(res.body))"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def test_not_implemented_error_with_xml(self):"},{"line_number":341,"context_line":"        expected_res \u003d {\u0027body\u0027: {\u0027NeutronError\u0027:"},{"line_number":342,"context_line":"                                {\u0027detail\u0027: \u0027\u0027,"},{"line_number":343,"context_line":"                                 \u0027message\u0027: _("}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_5703e7b7","line":340,"updated":"2014-08-14 16:51:42.000000000","message":"This test is mostly code duplication to the previous test - how about creating a private function (starts with \"_\", i.e. \"_my_private_func\") that does most of the logic?","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"9993e741cc03cd7290cd1dcd8ce1f0c4e04c0da4","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.assertEqual(expected_res,"},{"line_number":338,"context_line":"                         wsgi.JSONDeserializer().deserialize(res.body))"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def test_not_implemented_error_with_xml(self):"},{"line_number":341,"context_line":"        expected_res \u003d {\u0027body\u0027: {\u0027NeutronError\u0027:"},{"line_number":342,"context_line":"                                {\u0027detail\u0027: \u0027\u0027,"},{"line_number":343,"context_line":"                                 \u0027message\u0027: _("}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_1ed96a83","line":340,"in_reply_to":"7ac7a964_5703e7b7","updated":"2014-08-15 10:53:17.000000000","message":"Done","commit_id":"901442e73219a520f0f9159af93830fbf8012995"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3c623d08a432b96122cff213c284386ffea774e6","unresolved":false,"context_lines":[{"line_number":123,"context_line":"class ResourceTestCase(base.BaseTestCase):"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @staticmethod"},{"line_number":126,"context_line":"    def _get_desirializer(req_format):"},{"line_number":127,"context_line":"        if req_format \u003d\u003d \u0027json\u0027:"},{"line_number":128,"context_line":"            return wsgi.JSONDeserializer()"},{"line_number":129,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_b14ff991","line":126,"updated":"2014-08-18 12:07:03.000000000","message":"typo: _get_deserializer","commit_id":"126cd198997097cb421d9c3785ff107a3e324bd9"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"4086403d336bf646b34ea5ee6babcfa8739e718d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"class ResourceTestCase(base.BaseTestCase):"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @staticmethod"},{"line_number":126,"context_line":"    def _get_desirializer(req_format):"},{"line_number":127,"context_line":"        if req_format \u003d\u003d \u0027json\u0027:"},{"line_number":128,"context_line":"            return wsgi.JSONDeserializer()"},{"line_number":129,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_a2040916","line":126,"in_reply_to":"1abeadc6_b14ff991","updated":"2014-08-18 12:53:00.000000000","message":"Done","commit_id":"126cd198997097cb421d9c3785ff107a3e324bd9"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"a926e82869f03df30c7e270e546f7d523ae43c32","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                                 req_format\u003dreq_format)"},{"line_number":305,"context_line":"        self.assertEqual(exc.HTTPInternalServerError.code,"},{"line_number":306,"context_line":"                         res.status_int)"},{"line_number":307,"context_line":"        self.assertEqual(expected_res,"},{"line_number":308,"context_line":"                         self._get_desirializer("},{"line_number":309,"context_line":"                             req_format).deserialize(res.body))"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_7d2610bc","line":307,"updated":"2014-08-18 13:13:29.000000000","message":"oops :)","commit_id":"047798a8b74fe22dccc6b86c1709847f440dad91"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"41fc9a28ff8e3b4fdcd6f9d169998edb1849f82d","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                                 req_format\u003dreq_format)"},{"line_number":305,"context_line":"        self.assertEqual(exc.HTTPInternalServerError.code,"},{"line_number":306,"context_line":"                         res.status_int)"},{"line_number":307,"context_line":"        self.assertEqual(expected_res,"},{"line_number":308,"context_line":"                         self._get_desirializer("},{"line_number":309,"context_line":"                             req_format).deserialize(res.body))"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_dde2c402","line":307,"in_reply_to":"1abeadc6_7d2610bc","updated":"2014-08-18 13:23:28.000000000","message":"oops :)","commit_id":"047798a8b74fe22dccc6b86c1709847f440dad91"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"a926e82869f03df30c7e270e546f7d523ae43c32","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        res \u003d self._make_request_with_side_effect(exc.HTTPNotImplemented(),"},{"line_number":327,"context_line":"                                 req_format\u003dreq_format)"},{"line_number":328,"context_line":"        self.assertEqual(exc.HTTPNotImplemented.code, res.status_int)"},{"line_number":329,"context_line":"        self.assertEqual(expected_res,"},{"line_number":330,"context_line":"                         self._get_desirializer("},{"line_number":331,"context_line":"                             req_format).deserialize(res.body))"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_bd20a89c","line":329,"updated":"2014-08-18 13:13:29.000000000","message":"oops :)","commit_id":"047798a8b74fe22dccc6b86c1709847f440dad91"}]}
