)]}'
{"keystone/identity/backends/ldap/core.py":[{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"52b22848a66c7a9b36c6bd8b6e52e7fd862c14dd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    # CRUD"},{"line_number":164,"context_line":"    def create_user(self, user_id, user):"},{"line_number":165,"context_line":"        user[\u0027name\u0027] \u003d clean.user_name(user[\u0027name\u0027])"},{"line_number":166,"context_line":"        # If not present, enabled is defaulted to True"},{"line_number":167,"context_line":"        if \u0027enabled\u0027 in user:"},{"line_number":168,"context_line":"            user[\u0027enabled\u0027] \u003d clean.user_enabled(user[\u0027enabled\u0027])"},{"line_number":169,"context_line":"        return identity.filter_user(self.user.create(user))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FwFA%3D","line":166,"updated":"2013-04-24 20:29:09.000000000","message":"in all of these perhaps just say user[\u0027enabled\u0027] \u003d clean.user_enabled(user.get(\u0027enabled\u0027, True)) \n\nsaves all these if statements","commit_id":"4f314fcc3ccf1078e6defdca23f83a9e1bf37758"}],"tests/test_backend.py":[{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"52b22848a66c7a9b36c6bd8b6e52e7fd862c14dd","unresolved":false,"context_lines":[{"line_number":1531,"context_line":"                \u0027domain_id\u0027: DEFAULT_DOMAIN_ID,"},{"line_number":1532,"context_line":"                \u0027password\u0027: uuid.uuid4().hex,"},{"line_number":1533,"context_line":"                \u0027enabled\u0027: \"true\"}"},{"line_number":1534,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1535,"context_line":"                          self.identity_man.create_user, {},"},{"line_number":1536,"context_line":"                          user[\u0027id\u0027],"},{"line_number":1537,"context_line":"                          user)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FwEo%3D","line":1534,"updated":"2013-04-24 20:29:09.000000000","message":"in these cases, it seems like we may as well accept true|false but i don\u0027t have strong feelings there","commit_id":"4f314fcc3ccf1078e6defdca23f83a9e1bf37758"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e14bc7bef012ecbe9a151871005d2daf4de9ba95","unresolved":false,"context_lines":[{"line_number":1532,"context_line":"                \u0027password\u0027: uuid.uuid4().hex,"},{"line_number":1533,"context_line":"                \u0027enabled\u0027: \"true\"}"},{"line_number":1534,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1535,"context_line":"                          self.identity_man.create_user, {},"},{"line_number":1536,"context_line":"                          user[\u0027id\u0027],"},{"line_number":1537,"context_line":"                          user)"},{"line_number":1538,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fx1E%3D","line":1535,"updated":"2013-04-23 17:41:00.000000000","message":"Keystone supports xml format.   This code relies on python  boolean literal value.  REST request response should be language agnostic\n\nIn identity spec it is mentioned as\n{\n    \"entity\": {\n        \"name\": string,\n        \"description\": string,\n        \"enabled\": boolean\n    }\n}\n\nand all the examples use \"true\" for boolean\n\nBasically take the input \"true/false\" from REST layer and convert to \"True/False\" as expected by python and don\u0027t make user send True/False","commit_id":"4f314fcc3ccf1078e6defdca23f83a9e1bf37758"},{"author":{"_account_id":7309,"name":"Bruno Semperlotti","email":"bruno.semperlotti@gmail.com","username":"nonos"},"change_message_id":"d8404cb9cad8314878f44242a8c0583df648651d","unresolved":false,"context_lines":[{"line_number":1532,"context_line":"                \u0027password\u0027: uuid.uuid4().hex,"},{"line_number":1533,"context_line":"                \u0027enabled\u0027: \"true\"}"},{"line_number":1534,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1535,"context_line":"                          self.identity_man.create_user, {},"},{"line_number":1536,"context_line":"                          user[\u0027id\u0027],"},{"line_number":1537,"context_line":"                          user)"},{"line_number":1538,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fw38%3D","line":1535,"in_reply_to":"AAAAOn%2F%2Fx1E%3D","updated":"2013-04-24 09:09:58.000000000","message":"This precise code relies on python boolean only because this is a test case and does not represent the complete workflow of an HTTP request going through the JSON parser used by the REST API.\n\nIn the normal workflow, the JSON parser takes care of translating HTTP data into the appropriate python representation. \nAs JSON differentiates string and boolean types and is language agnostic, there is no python specific code when the REST API processes the request.\n\nIn my point of view, with the solution you proposed, ie. implicitly converting string \"true/false\" into python boolean, you break API consistency by allowing clients to use any json type in place of the expected boolean one. \nIf API accepts \"true/false\", what for other strings like \"True/False\", \"TRUE/FALSE\", \"yes/no\", \"0/1\" or integer values 0/1 ?","commit_id":"4f314fcc3ccf1078e6defdca23f83a9e1bf37758"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"52b22848a66c7a9b36c6bd8b6e52e7fd862c14dd","unresolved":false,"context_lines":[{"line_number":1540,"context_line":"                \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":1541,"context_line":"                \u0027domain_id\u0027: DEFAULT_DOMAIN_ID,"},{"line_number":1542,"context_line":"                \u0027password\u0027: uuid.uuid4().hex,"},{"line_number":1543,"context_line":"                \u0027enabled\u0027: 1}"},{"line_number":1544,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1545,"context_line":"                          self.identity_man.create_user, {},"},{"line_number":1546,"context_line":"                          user[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FwEc%3D","line":1543,"updated":"2013-04-24 20:29:09.000000000","message":"1 is valid in python,  bool(1) \u003d\u003d True, so this seems like it shouldn\u0027t raise an error and just be converted by the cleaning function","commit_id":"4f314fcc3ccf1078e6defdca23f83a9e1bf37758"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c2b53b36b4b000f2d23b227ee2131452d2844617","unresolved":false,"context_lines":[{"line_number":1689,"context_line":"        user_ref \u003d self.identity_api.get_user(\u0027fake1\u0027)"},{"line_number":1690,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], True)"},{"line_number":1691,"context_line":""},{"line_number":1692,"context_line":"        user[\u0027enabled\u0027] \u003d 0"},{"line_number":1693,"context_line":"        self.identity_api.update_user(\u0027fake1\u0027, user)"},{"line_number":1694,"context_line":"        user_ref \u003d self.identity_api.get_user(\u0027fake1\u0027)"},{"line_number":1695,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FrdM%3D","line":1692,"updated":"2013-04-29 14:07:38.000000000","message":"why specifically allow ints?","commit_id":"a14cd4a93a80612297497b1712a720ce2c0fd9b8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f15eeddeacffb38a51c2ab504afe928b223afd20","unresolved":false,"context_lines":[{"line_number":1689,"context_line":"        user_ref \u003d self.identity_api.get_user(\u0027fake1\u0027)"},{"line_number":1690,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], True)"},{"line_number":1691,"context_line":""},{"line_number":1692,"context_line":"        user[\u0027enabled\u0027] \u003d 0"},{"line_number":1693,"context_line":"        self.identity_api.update_user(\u0027fake1\u0027, user)"},{"line_number":1694,"context_line":"        user_ref \u003d self.identity_api.get_user(\u0027fake1\u0027)"},{"line_number":1695,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Frc0%3D","line":1692,"in_reply_to":"AAAAOn%2F%2FrdM%3D","updated":"2013-04-29 14:11:18.000000000","message":"ah, nvm!","commit_id":"a14cd4a93a80612297497b1712a720ce2c0fd9b8"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"2be728fba666de42cb5ed09b7aac8dd988f37ad9","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], True)"},{"line_number":1703,"context_line":""},{"line_number":1704,"context_line":"        user[\u0027enabled\u0027] \u003d \"false\""},{"line_number":1705,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1706,"context_line":"                          self.identity_api.update_user, \u0027fake1\u0027, user)"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def test_update_project_enable(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FlPI%3D","line":1705,"updated":"2013-05-02 23:26:29.000000000","message":"I assume a ValidationError is thrown because \"false\" is a string and not a boolean?   I would have loved a failure explanation comment here similar to the ones you provide elsewhere since I glazed over the quotes during my 1st pass.  But given there are like no comments in this file. I won\u0027t demand it :-)","commit_id":"65072ed4a5a895a8ad0fcb520f309ec6df4d6981"},{"author":{"_account_id":7309,"name":"Bruno Semperlotti","email":"bruno.semperlotti@gmail.com","username":"nonos"},"change_message_id":"e9b8b9e71febcb9aac0be2c83ca8822905c47dbd","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], True)"},{"line_number":1703,"context_line":""},{"line_number":1704,"context_line":"        user[\u0027enabled\u0027] \u003d \"false\""},{"line_number":1705,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1706,"context_line":"                          self.identity_api.update_user, \u0027fake1\u0027, user)"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def test_update_project_enable(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAO3%2F%2F87E%3D","line":1705,"in_reply_to":"AAAAOn%2F%2FdVc%3D","updated":"2013-05-16 10:14:31.000000000","message":"Done","commit_id":"65072ed4a5a895a8ad0fcb520f309ec6df4d6981"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d91fa2e3daebf5de89eec0ca6dd93b02541f45dc","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], True)"},{"line_number":1703,"context_line":""},{"line_number":1704,"context_line":"        user[\u0027enabled\u0027] \u003d \"false\""},{"line_number":1705,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1706,"context_line":"                          self.identity_api.update_user, \u0027fake1\u0027, user)"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def test_update_project_enable(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FdVc%3D","line":1705,"in_reply_to":"AAAAOn%2F%2Fk0E%3D","updated":"2013-05-08 23:26:56.000000000","message":"I\u0027d also like to see the comment, or change the name of the test function to say why it fails. Just adding a comment to line 1704  \"# invalid\" would be very helpful.\n\n(this applies to the other tests that were changed, too)","commit_id":"65072ed4a5a895a8ad0fcb520f309ec6df4d6981"},{"author":{"_account_id":7309,"name":"Bruno Semperlotti","email":"bruno.semperlotti@gmail.com","username":"nonos"},"change_message_id":"99ffb5fd31d3bf91300553866db267c0573d2aca","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        self.assertEqual(user_ref[\u0027enabled\u0027], True)"},{"line_number":1703,"context_line":""},{"line_number":1704,"context_line":"        user[\u0027enabled\u0027] \u003d \"false\""},{"line_number":1705,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":1706,"context_line":"                          self.identity_api.update_user, \u0027fake1\u0027, user)"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def test_update_project_enable(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fk0E%3D","line":1705,"in_reply_to":"AAAAOn%2F%2FlPI%3D","updated":"2013-05-03 09:15:44.000000000","message":"You\u0027re right, a comment here would have been helpful for a quick understanding of the test case.\nThis file is like a cathedral, no comment, no noise, only some whispers from time to time. Maybe it intimidates me.\n\nTo be more serious, the test is really short and giving that there is \"test_update_user_enable\" above which lists all valid values, it should be quite self-explanatory.\n\nSo, despite you are absolutely right, I would really prefer not have to restart the whole review process for a small comment.","commit_id":"65072ed4a5a895a8ad0fcb520f309ec6df4d6981"}],"tests/test_content_types.py":[{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"2be728fba666de42cb5ed09b7aac8dd988f37ad9","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            token\u003dtoken)"},{"line_number":501,"context_line":"        self.assertValidUserResponse(r)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_create_update_user_invalid_enabled_type(self):"},{"line_number":504,"context_line":"        # Enforce usage of boolean for \u0027enabled\u0027 field in JSON and XML"},{"line_number":505,"context_line":"        token \u003d self.get_scoped_token()"},{"line_number":506,"context_line":"        r \u003d self.admin_request("}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FlZA%3D","line":503,"updated":"2013-05-02 23:26:29.000000000","message":"Thanks for adding lots of test cases!","commit_id":"65072ed4a5a895a8ad0fcb520f309ec6df4d6981"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"2be728fba666de42cb5ed09b7aac8dd988f37ad9","unresolved":false,"context_lines":[{"line_number":796,"context_line":"                \u0027user\u0027: {"},{"line_number":797,"context_line":"                    \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":798,"context_line":"                    \u0027password\u0027: uuid.uuid4().hex,"},{"line_number":799,"context_line":"                    # In JSON, \"true|false\" are not boolean"},{"line_number":800,"context_line":"                    \u0027enabled\u0027: \"true\","},{"line_number":801,"context_line":"                },"},{"line_number":802,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FlZM%3D","line":799,"updated":"2013-05-02 23:26:29.000000000","message":"These types of comments are extremely helpful. Thanks for adding them","commit_id":"65072ed4a5a895a8ad0fcb520f309ec6df4d6981"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"46080221fda328c7ab092e6292ca3ca5cd673640","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            },"},{"line_number":519,"context_line":"            token\u003dtoken,"},{"line_number":520,"context_line":"            expected_status\u003d400)"},{"line_number":521,"context_line":"        self.assertValidErrorResponse(r)"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"        r \u003d self.admin_request("},{"line_number":524,"context_line":"            method\u003d\u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAO3%2F%2F77c%3D","line":521,"updated":"2013-05-16 18:07:33.000000000","message":"fyi, assertValidErrorResponse is called automatically when you assert an expected non-2xx status","commit_id":"840a0758e7dc12360acf83106526436135e8f814"}]}
