)]}'
{"nova/api/openstack/compute/contrib/flavormanage.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4aed1c5ae04f09ae59f2104b5c7aa9b59d47a247","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            req.cache_db_flavor(flavor)"},{"line_number":76,"context_line":"        except (exception.InstanceTypeExists,"},{"line_number":77,"context_line":"                exception.InstanceTypeIdExists,"},{"line_number":78,"context_line":"                exception.InvalidInput) as err:"},{"line_number":79,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003derr.format_message())"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return self._view_builder.show(req, flavor)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Fp%2F8%3D","line":78,"updated":"2013-05-28 13:55:30.000000000","message":"You should catch this exception separately since the first two exceptions should raise a 409 and this one a 400.","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"bd248188ece5a7011dbc2b090d3b5bb2fa8a1c8b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            req.cache_db_flavor(flavor)"},{"line_number":76,"context_line":"        except (exception.InstanceTypeExists,"},{"line_number":77,"context_line":"                exception.InstanceTypeIdExists,"},{"line_number":78,"context_line":"                exception.InvalidInput) as err:"},{"line_number":79,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003derr.format_message())"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return self._view_builder.show(req, flavor)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Fp3M%3D","line":78,"in_reply_to":"AAAAPH%2F%2Fp%2F8%3D","updated":"2013-05-28 14:56:06.000000000","message":"I\u0027ll separate the exceptions, please review my new patch","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"5da16bf089759e9a4a7012239865f944c0356020","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        except (exception.InstanceTypeExists,"},{"line_number":77,"context_line":"                exception.InstanceTypeIdExists) as err:"},{"line_number":78,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003derr.format_message())"},{"line_number":79,"context_line":"        except(exception.InvalidInput) as exc:"},{"line_number":80,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        return self._view_builder.show(req, flavor)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2F2sE%3D","line":79,"updated":"2013-06-07 14:09:04.000000000","message":"Should have a space between except and the exception type.  And the parentheses are not needed.  They\u0027re used above because it spans multiple lines.","commit_id":"dd02e30e6fa97043d29dcfb60ffd412cd0fdaac6"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"91b149f4b2008d543da148caba70053b046ac885","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        except (exception.InstanceTypeExists,"},{"line_number":77,"context_line":"                exception.InstanceTypeIdExists) as err:"},{"line_number":78,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003derr.format_message())"},{"line_number":79,"context_line":"        except(exception.InvalidInput) as exc:"},{"line_number":80,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        return self._view_builder.show(req, flavor)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2F1Og%3D","line":79,"in_reply_to":"AAAAPX%2F%2F2sE%3D","updated":"2013-06-08 03:34:20.000000000","message":"ok, I\u0027ll modify it","commit_id":"dd02e30e6fa97043d29dcfb60ffd412cd0fdaac6"}],"nova/compute/flavors.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de6fe27263b17fac5ef9cf049e9b71c037c1d42e","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":110,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":111,"context_line":"        except (ValueError, AssertionError):"},{"line_number":112,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":113,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    # rxtx_factor should be a positive float"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPH%2F%2Fj7k%3D","line":112,"updated":"2013-05-30 14:38:58.000000000","message":"This block is nearly identical to the one above it, except it allows 0 as the value. Note that the previous message indicated that, i.e. \"must be greater than or equal to 0\".  I think saying that it must be a positive integer in this case potentially regresses the usability of the error message. You want it to say it must be an integer since we don\u0027t allow decimals, so maybe the message should say \"\u0027\u0027%s\u0027 argument must be an integer greater than or equal to 0\".","commit_id":"46710c955c561366352286c28aea2cdaef948865"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"4a03b9b0277669f9b2cf9ae55e73ade05753127d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":110,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":111,"context_line":"        except (ValueError, AssertionError):"},{"line_number":112,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":113,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    # rxtx_factor should be a positive float"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPH%2F%2Fj0g%3D","line":112,"in_reply_to":"AAAAPH%2F%2Fj7k%3D","updated":"2013-05-30 15:11:25.000000000","message":"please review my new patch","commit_id":"46710c955c561366352286c28aea2cdaef948865"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"5da16bf089759e9a4a7012239865f944c0356020","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":94,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            if kwargs[option] !\u003d None:"},{"line_number":97,"context_line":"                assert int(kwargs[option]) \u003e 0"},{"line_number":98,"context_line":"                assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":99,"context_line":"            kwargs[option] \u003d int(kwargs[option])"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2F2r4%3D","line":96,"updated":"2013-06-07 14:09:04.000000000","message":"I\u0027m curious why you\u0027re checking for None here.  If it\u0027s None you\u0027re going to get a TypeError with the \u0027int(kwargs[option])\u0027 below.  I would remove this check and add TypeError to the list of caught exceptions.\n\nAnd generally for a None check you would use \u0027is not\u0027 rather than \u0027!\u003d\u0027.","commit_id":"dd02e30e6fa97043d29dcfb60ffd412cd0fdaac6"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"91b149f4b2008d543da148caba70053b046ac885","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":94,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            if kwargs[option] !\u003d None:"},{"line_number":97,"context_line":"                assert int(kwargs[option]) \u003e 0"},{"line_number":98,"context_line":"                assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":99,"context_line":"            kwargs[option] \u003d int(kwargs[option])"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2F1Oc%3D","line":96,"in_reply_to":"AAAAPX%2F%2F2r4%3D","updated":"2013-06-08 03:34:20.000000000","message":"yes, you are right, the ValueError can cover None exception, so I\u0027ll only remove the checking.","commit_id":"dd02e30e6fa97043d29dcfb60ffd412cd0fdaac6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e36fac9982a9bb9e87b570ddd1652c4fb836e823","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":97,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":98,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":99,"context_line":"        except (ValueError, AssertionError):"},{"line_number":100,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":101,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPX%2F%2F0tQ%3D","line":99,"updated":"2013-06-08 17:00:17.000000000","message":"In the last patch review, Andrew said that casting None would result in a TypeError and you should add that to the list of exceptions to catch, but you\u0027re not doing that.","commit_id":"634d5f4c685a9c93c9217389c7000e8b2f456a4c"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"23ba13693a5db725bf6484d27dcf552c0dad04cd","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":97,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":98,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":99,"context_line":"        except (ValueError, AssertionError):"},{"line_number":100,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":101,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPX%2F%2F0r8%3D","line":99,"in_reply_to":"AAAAPX%2F%2F0tQ%3D","updated":"2013-06-08 17:34:55.000000000","message":"The original code just catches ValueError and AssertionError, so I think ValueError can cover TypeError.\nOk, I\u0027ll add TypeError into the list in my new patch.","commit_id":"634d5f4c685a9c93c9217389c7000e8b2f456a4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e36fac9982a9bb9e87b570ddd1652c4fb836e823","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            assert int(kwargs[option]) \u003e\u003d 0"},{"line_number":107,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":108,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":109,"context_line":"        except (ValueError, AssertionError):"},{"line_number":110,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be an integer greater than or\""},{"line_number":111,"context_line":"                    \" equal to 0\") % option"},{"line_number":112,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPX%2F%2F0tM%3D","line":109,"updated":"2013-06-08 17:00:17.000000000","message":"Same here, catch TypeError for the None case.","commit_id":"634d5f4c685a9c93c9217389c7000e8b2f456a4c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"60680d7334b7b4e09d25c0774ff3e5c3a0938a82","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":96,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":99,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":100,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":101,"context_line":"        except (ValueError, AssertionError, TypeError):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPn%2F%2F9M4%3D","line":98,"updated":"2013-06-17 13:59:42.000000000","message":"How about \"assert int(str(val)) \u003e 0\"?\nIf \"assert int(str(val)) \u003e 0\", line99 is unnecessary.","commit_id":"a90420237679f6ee2239100fd3b626dcc5d46d31"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"142b55557c20b2f5d7ab82bde4d0ed809bebe899","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":96,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":99,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":100,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":101,"context_line":"        except (ValueError, AssertionError, TypeError):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPn%2F%2F%2BbU%3D","line":98,"updated":"2013-06-16 15:30:22.000000000","message":"why do you don\u0027t like previous variant?\nwith kwragrs[option] \u003d int(...) as a first line?","commit_id":"a90420237679f6ee2239100fd3b626dcc5d46d31"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"45c779f536fba7059226cfecc9d7a555a3f1ea21","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":96,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":99,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":100,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":101,"context_line":"        except (ValueError, AssertionError, TypeError):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPn%2F%2F%2BF8%3D","line":98,"in_reply_to":"AAAAPn%2F%2F%2BbU%3D","updated":"2013-06-17 03:01:13.000000000","message":"because we should check whether attributes are positive integers at first, then do assignment, this is the right and more reasonable code logic, that why I put kwragrs[option] \u003d int(...) after assertion codes","commit_id":"a90420237679f6ee2239100fd3b626dcc5d46d31"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"e98f2163b204de9e544f329ba82230eb1b75a3fe","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":96,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":99,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":100,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":101,"context_line":"        except (ValueError, AssertionError, TypeError):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPn%2F%2F7O8%3D","line":98,"in_reply_to":"AAAAPn%2F%2F89g%3D","updated":"2013-06-18 05:38:44.000000000","message":"yes, I checked \"assert int(str(123.3)) \u003e 0\", it throws ValueError. I think it\u0027s acceptable and it\u0027s a more concise code, I\u0027ll use it and remove line 99 and line 109 in my new patch.\nThank you!","commit_id":"a90420237679f6ee2239100fd3b626dcc5d46d31"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"da3edcd03e2ea44c85ea6ef6359be972e86c7b96","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":96,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":99,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":100,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":101,"context_line":"        except (ValueError, AssertionError, TypeError):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPn%2F%2F89g%3D","line":98,"in_reply_to":"AAAAPn%2F%2F9Bk%3D","updated":"2013-06-17 14:58:57.000000000","message":"sorry for my typo. I\u0027d like to say \"assert int(str(kwargs[option])) \u003e 0\".\nIf kwargs[option] is not integer(e.g. float), ValueError happens at \"assert int(str(kwargs[option])).","commit_id":"a90420237679f6ee2239100fd3b626dcc5d46d31"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"65d1bac7bb292fa8fea387d389ea95e339658a83","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Some attributes are positive ( \u003e 0) integers"},{"line_number":96,"context_line":"    for option in [\u0027memory_mb\u0027, \u0027vcpus\u0027]:"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(kwargs[option]) \u003e 0"},{"line_number":99,"context_line":"            assert (float(kwargs[option]) - int(kwargs[option])) \u003d\u003d 0"},{"line_number":100,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":101,"context_line":"        except (ValueError, AssertionError, TypeError):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPn%2F%2F9Bk%3D","line":98,"in_reply_to":"AAAAPn%2F%2F9M4%3D","updated":"2013-06-17 14:40:02.000000000","message":"Please check code line 77 to line 84, memory_mb,vcpus and other arguments are assigned to kwargs, so int(kwargs[option]) is the right code should be used in for loop.\nLine 99 is necessary code to guarantee that values aren\u0027t decimal number","commit_id":"a90420237679f6ee2239100fd3b626dcc5d46d31"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d5973ae90aad0f58b8ed2e35313c86b8d3fc13a4","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            assert int(str(kwargs[option])) \u003e 0"},{"line_number":99,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":100,"context_line":"        except (ValueError, AssertionError, TypeError):"},{"line_number":101,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":102,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # Some attributes are non-negative ( \u003e\u003d 0) integers"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2F7Ac%3D","line":101,"updated":"2013-06-18 07:24:02.000000000","message":"i think that the old message was better.","commit_id":"65286330abf9d913b4c3aa0f87b362625058ae8d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76f2f191d5edce51bef2ae0e30f175e730c4a3da","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            assert int(str(kwargs[option])) \u003e 0"},{"line_number":99,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":100,"context_line":"        except (ValueError, AssertionError, TypeError):"},{"line_number":101,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":102,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # Some attributes are non-negative ( \u003e\u003d 0) integers"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2F6aY%3D","line":101,"in_reply_to":"AAAAPn%2F%2F66M%3D","updated":"2013-06-18 13:13:31.000000000","message":"I tend to agree with David here.  Remember the context of the fix is to explicitly check for non-integers. So if the message says it just has to be greater than 0, could I think that passing in 5.5 is acceptable?  The new message makes it explicit that it needs to be a positive integer, so floats aren\u0027t allowed.","commit_id":"65286330abf9d913b4c3aa0f87b362625058ae8d"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"8db376aeeed3039680dea5a34cad4a2741ebe11c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            assert int(str(kwargs[option])) \u003e 0"},{"line_number":99,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":100,"context_line":"        except (ValueError, AssertionError, TypeError):"},{"line_number":101,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":102,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # Some attributes are non-negative ( \u003e\u003d 0) integers"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2F66M%3D","line":101,"in_reply_to":"AAAAPn%2F%2F7Ac%3D","updated":"2013-06-18 08:33:18.000000000","message":"I think the new message is more clear than old version, it can more clearly tell user what is legal argument.","commit_id":"65286330abf9d913b4c3aa0f87b362625058ae8d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d5973ae90aad0f58b8ed2e35313c86b8d3fc13a4","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            assert int(str(kwargs[option])) \u003e\u003d 0"},{"line_number":108,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":109,"context_line":"        except (ValueError, AssertionError, TypeError):"},{"line_number":110,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be an integer greater than or\""},{"line_number":111,"context_line":"                    \" equal to 0\") % option"},{"line_number":112,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2F7AY%3D","line":110,"updated":"2013-06-18 07:24:02.000000000","message":"ditto","commit_id":"65286330abf9d913b4c3aa0f87b362625058ae8d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"505371956d188f7b4564871bd9d7dbf80cbc3aaa","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            assert int(str(kwargs[option])) \u003e 0"},{"line_number":99,"context_line":"            kwargs[option] \u003d int(kwargs[option])"},{"line_number":100,"context_line":"        except (ValueError, AssertionError, TypeError):"},{"line_number":101,"context_line":"            msg \u003d _(\"\u0027%s\u0027 argument must be a positive integer\") % option"},{"line_number":102,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FuGQ%3D","line":100,"updated":"2013-06-24 14:31:05.000000000","message":"Now that you\u0027re casting to a str first the TypeError won\u0027t get raised.  int(None) is a TypeError, int(str(None)) is a ValueError.  Same thing below.","commit_id":"8ee10c55b045ab6d85b41dddbbb95384d009fb9b"}],"nova/tests/api/openstack/compute/contrib/test_flavor_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4616c4c46934b27697528ba10c620c9d312620cb","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":223,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":226,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":227,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":228,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Fp9Y%3D","line":225,"updated":"2013-05-28 14:07:36.000000000","message":"Need to use assertRaises in this test case, here is how I re-wrote your test case:\n\n    def test_invalid_memory_mb(self):\n        \"\"\"Check negative and decimal memory_mb number can\u0027t be accepted\"\"\"\n        self.assertRaises(exception.InvalidInput, flavors.create,\n                          \"abcd\", -512, 2, 1, 1, 1234, 512, 1, True)\n        self.assertRaises(exception.InvalidInput, flavors.create,\n                          \"abcd\", 512.2, 2, 1, 1, 1234, 512, 1, True)","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be86e1ee0b17938f73a54caafc4f0113ffd2a7d4","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":223,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":226,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":227,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":228,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FpuA%3D","line":225,"in_reply_to":"AAAAPH%2F%2Fp2A%3D","updated":"2013-05-28 15:20:37.000000000","message":"OK, I see the problem in the setUp method on line 87.  Since it\u0027s stubbing out flavors.create, then I still don\u0027t think your tests are working, i.e. how do you know they are actually throwing an exception?  Is it just testing the fake_create method (I think so).\n\nWhat you probably need to do is modify the setup to not stub out fake_create in certain test cases (like this one) or remove the stub added by the setUp method so that it\u0027s calling the real flavors.create method.\n\nBarring all that, you\u0027d at least need a fail() call after the flavors.create lines in this method if you\u0027re just going to test it with a try/except block, but I really don\u0027t like that.","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"bd248188ece5a7011dbc2b090d3b5bb2fa8a1c8b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":223,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":226,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":227,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":228,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Fp2A%3D","line":225,"in_reply_to":"AAAAPH%2F%2Fp9Y%3D","updated":"2013-05-28 14:56:06.000000000","message":"I had tried self.assertRaises, but it can\u0027t work, because in \ntest_flavor manage modlue, there is a fake_create function,\n when using self.assertRaises, fake_create function is\n actually be called instead of real flavors.create funtion and \nyou will get return information:\n\nTraceback (most recent call last):\n  File \"nova/tests/api/openstack/compute/contrib\n/test_flavor_manage.py\", line 228, in test_invalid_memory_mb\n    self.assertRaises(exception.InvalidInput, flavors.create, \n\"abcd\", -512, 2, 1, 1, 1234, 512, 1, True)\nMismatchError: \u003cfunction fake_create at 0xbf1aae4\u003e returned\n {\u0027disabled\u0027: False, \u0027root_gb\u0027: 1, \u0027deleted_at\u0027: None, \u0027name\u0027: \n\u0027abcd\u0027, \u0027deleted\u0027: False, \u0027created_at\u0027: datetime.datetime(2012, 1, \n19, 18, 49, 30, 877329), \u0027ephemeral_gb\u0027: 1, \u0027updated_at\u0027: \nNone, \u0027memory_mb\u0027: -512, \u0027vcpus\u0027: 2, \u0027extra_specs\u0027: {}, \u0027swap\u0027: \n512, \u0027rxtx_factor\u0027: 1.0, \u0027is_public\u0027: True, \u0027flavorid\u0027: 1234, \n\u0027vcpu_weight\u0027: None, \u0027id\u0027: 7}","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"8857225af2b50d8946d2b45c66dac4e0a3f7a30b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":223,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":226,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":227,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":228,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FmuE%3D","line":225,"in_reply_to":"AAAAPH%2F%2FpuA%3D","updated":"2013-05-29 14:16:59.000000000","message":"I write new fake_create function instead of modifying setup function, in order to avoid impact on other test cases in test_flaovr_manage, I think this is the best way to test my code change in flavors.create","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"a36bcaced6db26e616150b19328e95ce6aa1ed7c","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":223,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":226,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":227,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":228,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FmvE%3D","line":225,"in_reply_to":"AAAAPH%2F%2FpuA%3D","updated":"2013-05-29 14:11:38.000000000","message":"yes, my test case actually call default fake_create function, so I defined a new fake_create function to run real program logic in flavors.create function, please review my new patch","commit_id":"26100ebb88f67712bb10ff1574ec272216e30c0a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"744fbcf68ff865867ca365732a2facc7ff4ac4b1","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":223,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":224,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":225,"context_line":"        def fake_create(name, memory_mb, vcpus, root_gb, ephemeral_gb,"},{"line_number":226,"context_line":"                        flavorid, swap, rxtx_factor, is_public):"},{"line_number":227,"context_line":"            kwargs \u003d {"},{"line_number":228,"context_line":"                      \u0027memory_mb\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Fmp0%3D","line":225,"updated":"2013-05-29 14:43:20.000000000","message":"This is essentially a copy of the method you want to test, which introduces dual maintenance to the code.  If the original method changes, a bug may be re-introduced but you wouldn\u0027t catch it since you\u0027ve defined the code you\u0027re testing here.","commit_id":"36858b2eed11235518246e4c37fd1c04b72bb610"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"74091238796e7258aa2847fb7020354c5df3aa01","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":223,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":224,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":225,"context_line":"        def fake_create(name, memory_mb, vcpus, root_gb, ephemeral_gb,"},{"line_number":226,"context_line":"                        flavorid, swap, rxtx_factor, is_public):"},{"line_number":227,"context_line":"            kwargs \u003d {"},{"line_number":228,"context_line":"                      \u0027memory_mb\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Fmg0%3D","line":225,"in_reply_to":"AAAAPH%2F%2Fmp0%3D","updated":"2013-05-29 15:18:20.000000000","message":"yes, I agree that copy the method should be tested isn\u0027t good. I\u0027ll ignore the jenkins failure and search whether there is a way to enable real code testing without modifying setup function and impact on other test cases.","commit_id":"36858b2eed11235518246e4c37fd1c04b72bb610"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"728cdd231fc8f1bdf8925d33e6436f5c82982f71","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        self.assertEqual(res.status_int, 409)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":225,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":226,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":227,"context_line":"        self.stubs.Set(flavors, \"create\", create)"},{"line_number":228,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlBY%3D","line":225,"updated":"2013-05-30 03:49:39.000000000","message":"Nit: This docstring can be on one line.","commit_id":"3c56e709d5acf7abbaa96ba15f0a197464f472a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"728cdd231fc8f1bdf8925d33e6436f5c82982f71","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":225,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":226,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":227,"context_line":"        self.stubs.Set(flavors, \"create\", create)"},{"line_number":228,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","},{"line_number":229,"context_line":"                          -512, 2, 1, 1, 1234, 512, 1, True)"},{"line_number":230,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlBQ%3D","line":227,"updated":"2013-05-30 03:49:39.000000000","message":"Not sure that I like resetting the stubbed out method since you have to import it, I prefer to just unset the stubs set in the setUp method.  You should at least add a comment explaining why you\u0027re doing this.","commit_id":"3c56e709d5acf7abbaa96ba15f0a197464f472a3"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"bedcf97e5e7b32b3d5d57027edd915adbd8dbcb2","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":225,"context_line":"        \"\"\"Check negative and decimal memory_mb"},{"line_number":226,"context_line":"        number can\u0027t be accepted\"\"\""},{"line_number":227,"context_line":"        self.stubs.Set(flavors, \"create\", create)"},{"line_number":228,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","},{"line_number":229,"context_line":"                          -512, 2, 1, 1, 1234, 512, 1, True)"},{"line_number":230,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlA0%3D","line":227,"in_reply_to":"AAAAPH%2F%2FlBQ%3D","updated":"2013-05-30 03:56:51.000000000","message":"yes, temporarily unset all fake function can work,please review my new patch","commit_id":"3c56e709d5acf7abbaa96ba15f0a197464f472a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ff313c5a3fddd7ad4c391d540ee44d235aa0398","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"class FlavorManageTest(test.TestCase):"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def setUp(self):"},{"line_number":83,"context_line":"        super(FlavorManageTest, self).setUp()"},{"line_number":84,"context_line":"        self.stubs.Set(flavors,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FlAU%3D","line":81,"updated":"2013-05-30 04:01:43.000000000","message":"Why is this new line here?","commit_id":"219a0da2a9d178e3e9f91193908606992944293d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ff313c5a3fddd7ad4c391d540ee44d235aa0398","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":221,"context_line":"        self.assertEqual(res.status_int, 409)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":224,"context_line":"        \"\"\"Check negative and decimal memory_mb number can\u0027t be accepted\"\"\""},{"line_number":225,"context_line":"        self.stubs.UnsetAll()"},{"line_number":226,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FlAY%3D","line":223,"updated":"2013-05-30 04:01:43.000000000","message":"I like it :)","commit_id":"219a0da2a9d178e3e9f91193908606992944293d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a40ac7c039ead063b19eef859f5303033699e7c4","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","},{"line_number":230,"context_line":"                          512.2, 2, 1, 1, 1234, 512, 1, True)"},{"line_number":231,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcde\","},{"line_number":232,"context_line":"                          \"string memory\", 2, 1, 1, 1234, 512, 1, True)"},{"line_number":233,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcdef\","},{"line_number":234,"context_line":"                          512, 2, \"string root_gb\", 1, 1234, 512, 1, True)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2FnAk%3D","line":232,"updated":"2013-06-14 13:19:59.000000000","message":"The point of adding these two tests was to exercise the TypeError exception in the code but passing in a string doesn\u0027t result in a TypeError, it gives a ValueError (which is already tested here).  So please pass None for the memory and root_gb values to test the TypeError case.\n\n\u003e\u003e\u003e print int(\"memory_test\")\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nValueError: invalid literal for int() with base 10: \u0027memory_test\u0027\n\u003e\u003e\u003e print int(None)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: int() argument must be a string or a number, not \u0027NoneType\u0027","commit_id":"c7f670a58ae0a820e4a04f1d7e74e8d4f91825e4"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"1d75c04120774f1a64443b2c6c2ffa5c4d78d220","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","},{"line_number":230,"context_line":"                          512.2, 2, 1, 1, 1234, 512, 1, True)"},{"line_number":231,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcde\","},{"line_number":232,"context_line":"                          \"string memory\", 2, 1, 1, 1234, 512, 1, True)"},{"line_number":233,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcdef\","},{"line_number":234,"context_line":"                          512, 2, \"string root_gb\", 1, 1234, 512, 1, True)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2Fm60%3D","line":232,"in_reply_to":"AAAAPX%2F%2FnAk%3D","updated":"2013-06-14 13:58:56.000000000","message":"ok, I\u0027ll add None value checking test cases, thanks for your comments","commit_id":"c7f670a58ae0a820e4a04f1d7e74e8d4f91825e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d5973ae90aad0f58b8ed2e35313c86b8d3fc13a4","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        number can\u0027t be accepted."},{"line_number":225,"context_line":"        \"\"\""},{"line_number":226,"context_line":"        self.stubs.UnsetAll()"},{"line_number":227,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abc\","},{"line_number":228,"context_line":"                          -512, 2, 1, 1, 1234, 512, 1, True)"},{"line_number":229,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","},{"line_number":230,"context_line":"                          512.2, 2, 1, 1, 1234, 512, 1, True)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2F7AU%3D","line":227,"updated":"2013-06-18 07:24:02.000000000","message":"Can you also check passing in text instead of an integer?","commit_id":"65286330abf9d913b4c3aa0f87b362625058ae8d"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"8db376aeeed3039680dea5a34cad4a2741ebe11c","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        number can\u0027t be accepted."},{"line_number":225,"context_line":"        \"\"\""},{"line_number":226,"context_line":"        self.stubs.UnsetAll()"},{"line_number":227,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abc\","},{"line_number":228,"context_line":"                          -512, 2, 1, 1, 1234, 512, 1, True)"},{"line_number":229,"context_line":"        self.assertRaises(exception.InvalidInput, flavors.create, \"abcd\","},{"line_number":230,"context_line":"                          512.2, 2, 1, 1, 1234, 512, 1, True)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPn%2F%2F66I%3D","line":227,"in_reply_to":"AAAAPn%2F%2F7AU%3D","updated":"2013-06-18 08:33:18.000000000","message":"I\u0027ll add text checking in my new patch","commit_id":"65286330abf9d913b4c3aa0f87b362625058ae8d"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"1eb6be0258bc154a3c3a8ad93f7f7d2abd24138d","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        self.assertEqual(res.status_int, 409)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":223,"context_line":"        \"\"\"Check negative and decimal number"},{"line_number":224,"context_line":"        can\u0027t be accepted."},{"line_number":225,"context_line":"        \"\"\""},{"line_number":226,"context_line":"        self.stubs.UnsetAll()"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAPn%2F%2F0dI%3D","line":223,"updated":"2013-06-20 13:58:53.000000000","message":"I think this docstring would fit in one line.","commit_id":"f4839d2f41e1fdec7e0dc6dd2ba7a9f73fe0033b"},{"author":{"_account_id":7138,"name":"David Jia","email":"jiataotj@cn.ibm.com","username":"jiataotj"},"change_message_id":"fb49dc8ee7556a57b1782d02c552a414e4c6bc65","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        self.assertEqual(res.status_int, 409)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def test_invalid_memory_mb(self):"},{"line_number":223,"context_line":"        \"\"\"Check negative and decimal number"},{"line_number":224,"context_line":"        can\u0027t be accepted."},{"line_number":225,"context_line":"        \"\"\""},{"line_number":226,"context_line":"        self.stubs.UnsetAll()"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAPn%2F%2FvE0%3D","line":223,"in_reply_to":"AAAAPn%2F%2F0dI%3D","updated":"2013-06-24 03:29:43.000000000","message":"Please check my new patch","commit_id":"f4839d2f41e1fdec7e0dc6dd2ba7a9f73fe0033b"}]}
