)]}'
{"heat/api/openstack/v1/stacks.py":[{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"2164c84e77795aef780067e4ab8fc04bdb928c53","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        whitelist \u003d [\u0027limit\u0027, \u0027sort_keys\u0027, \u0027marker\u0027, \u0027sort_dir\u0027]"},{"line_number":183,"context_line":"        params \u003d {}"},{"line_number":184,"context_line":"        for key in request.params:"},{"line_number":185,"context_line":"            if key in whitelist:"},{"line_number":186,"context_line":"                value \u003d request.params.getall(key)"},{"line_number":187,"context_line":"                if type(value) is list and len(value) \u003d\u003d 1:"},{"line_number":188,"context_line":"                    value \u003d value.pop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FWQg%3D","line":185,"updated":"2013-11-08 16:16:14.000000000","message":"two iteration by same variable name makes me confused. Can you please use different names here?","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"5c37d9a983d92af76580a7f70171f26571ac60d8","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        whitelist \u003d [\u0027limit\u0027, \u0027sort_keys\u0027, \u0027marker\u0027, \u0027sort_dir\u0027]"},{"line_number":183,"context_line":"        params \u003d {}"},{"line_number":184,"context_line":"        for key in request.params:"},{"line_number":185,"context_line":"            if key in whitelist:"},{"line_number":186,"context_line":"                value \u003d request.params.getall(key)"},{"line_number":187,"context_line":"                if type(value) is list and len(value) \u003d\u003d 1:"},{"line_number":188,"context_line":"                    value \u003d value.pop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV4E%3D","line":185,"in_reply_to":"AAAATn%2F%2FV%2BY%3D","updated":"2013-11-08 22:18:19.000000000","message":"Agreed. Will change to `allowed_params`, since we\u0027re really only allowing whitelisted params","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":2834,"name":"Steven Dake","email":"steven.dake@gmail.com","username":"sdake"},"change_message_id":"26070fa24f8d0cc54efd705dc37d605fc2b3ac45","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        whitelist \u003d [\u0027limit\u0027, \u0027sort_keys\u0027, \u0027marker\u0027, \u0027sort_dir\u0027]"},{"line_number":183,"context_line":"        params \u003d {}"},{"line_number":184,"context_line":"        for key in request.params:"},{"line_number":185,"context_line":"            if key in whitelist:"},{"line_number":186,"context_line":"                value \u003d request.params.getall(key)"},{"line_number":187,"context_line":"                if type(value) is list and len(value) \u003d\u003d 1:"},{"line_number":188,"context_line":"                    value \u003d value.pop()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV%2BY%3D","line":185,"in_reply_to":"AAAATn%2F%2FWQg%3D","updated":"2013-11-08 20:10:59.000000000","message":"Victor,\n\nDo you mean request.params and the local variable params is confusing?  If so, I agree.  One option is to rename the local params to something like \"res\".","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"2164c84e77795aef780067e4ab8fc04bdb928c53","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        for key in request.params:"},{"line_number":185,"context_line":"            if key in whitelist:"},{"line_number":186,"context_line":"                value \u003d request.params.getall(key)"},{"line_number":187,"context_line":"                if type(value) is list and len(value) \u003d\u003d 1:"},{"line_number":188,"context_line":"                    value \u003d value.pop()"},{"line_number":189,"context_line":"                params[key] \u003d value"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FWQc%3D","line":187,"updated":"2013-11-08 16:16:14.000000000","message":"nit: use isinstance() for type check.","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"5c37d9a983d92af76580a7f70171f26571ac60d8","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        for key in request.params:"},{"line_number":185,"context_line":"            if key in whitelist:"},{"line_number":186,"context_line":"                value \u003d request.params.getall(key)"},{"line_number":187,"context_line":"                if type(value) is list and len(value) \u003d\u003d 1:"},{"line_number":188,"context_line":"                    value \u003d value.pop()"},{"line_number":189,"context_line":"                params[key] \u003d value"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV4A%3D","line":187,"in_reply_to":"AAAATn%2F%2FV%2BU%3D","updated":"2013-11-08 22:18:19.000000000","message":"done","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":2834,"name":"Steven Dake","email":"steven.dake@gmail.com","username":"sdake"},"change_message_id":"26070fa24f8d0cc54efd705dc37d605fc2b3ac45","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        for key in request.params:"},{"line_number":185,"context_line":"            if key in whitelist:"},{"line_number":186,"context_line":"                value \u003d request.params.getall(key)"},{"line_number":187,"context_line":"                if type(value) is list and len(value) \u003d\u003d 1:"},{"line_number":188,"context_line":"                    value \u003d value.pop()"},{"line_number":189,"context_line":"                params[key] \u003d value"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV%2BU%3D","line":187,"in_reply_to":"AAAATn%2F%2FWQc%3D","updated":"2013-11-08 20:10:59.000000000","message":"agree","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"2164c84e77795aef780067e4ab8fc04bdb928c53","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                params[key] \u003d value"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        sort_keys \u003d params.get(\u0027sort_keys\u0027)"},{"line_number":192,"context_line":"        if sort_keys and type(sort_keys) is not list:"},{"line_number":193,"context_line":"            params[\u0027sort_keys\u0027] \u003d [sort_keys]"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        return params"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FWQY%3D","line":192,"updated":"2013-11-08 16:16:14.000000000","message":"ditto","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"5c37d9a983d92af76580a7f70171f26571ac60d8","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                params[key] \u003d value"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        sort_keys \u003d params.get(\u0027sort_keys\u0027)"},{"line_number":192,"context_line":"        if sort_keys and type(sort_keys) is not list:"},{"line_number":193,"context_line":"            params[\u0027sort_keys\u0027] \u003d [sort_keys]"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        return params"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV38%3D","line":192,"in_reply_to":"AAAATn%2F%2FV%2BQ%3D","updated":"2013-11-08 22:18:19.000000000","message":"done","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":2834,"name":"Steven Dake","email":"steven.dake@gmail.com","username":"sdake"},"change_message_id":"26070fa24f8d0cc54efd705dc37d605fc2b3ac45","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                params[key] \u003d value"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        sort_keys \u003d params.get(\u0027sort_keys\u0027)"},{"line_number":192,"context_line":"        if sort_keys and type(sort_keys) is not list:"},{"line_number":193,"context_line":"            params[\u0027sort_keys\u0027] \u003d [sort_keys]"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        return params"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV%2BQ%3D","line":192,"in_reply_to":"AAAATn%2F%2FWQY%3D","updated":"2013-11-08 20:10:59.000000000","message":"agree","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"93098e21abc5444b342d555e6bb020d0a41855db","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                value \u003d value.pop()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"            if value !\u003d []:"},{"line_number":190,"context_line":"                allowed_params[key] \u003d value"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return allowed_params"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FTFk%3D","line":190,"updated":"2013-11-11 13:32:11.000000000","message":"There\u0027s no test coverage for either of the conditional code paths here.","commit_id":"b77047ea4aa35f4a285794069e2249b954e492e0"}],"heat/api/openstack/v1/util.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"578034a503c48708edfe6be22c118aa494726239","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return {\u0027href\u0027: make_url(req, identity), \u0027rel\u0027: relationship}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_allowed_params(params, whitelist):"},{"line_number":68,"context_line":"    allowed_params \u003d {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    for key in whitelist:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FPrY%3D","line":67,"updated":"2013-11-12 10:56:10.000000000","message":"Would be nice to have a docstring here, it is not entirely obvious what this method is intended to do.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"962aed4627ed1914804c18f6fc555f015d328516","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return {\u0027href\u0027: make_url(req, identity), \u0027rel\u0027: relationship}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_allowed_params(params, whitelist):"},{"line_number":68,"context_line":"    allowed_params \u003d {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    for key in whitelist:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FOws%3D","line":67,"in_reply_to":"AAAATn%2F%2FPrY%3D","updated":"2013-11-12 18:31:33.000000000","message":"Agreed. Docstring coming right up.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"782ae6c7f57d9535ab48ed5c75550af7afe81c1d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    allowed_params \u003d {}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    for key in whitelist:"},{"line_number":83,"context_line":"        value \u003d params.getall(key)"},{"line_number":84,"context_line":"        if len(value) \u003d\u003d 1:"},{"line_number":85,"context_line":"            value \u003d value.pop()"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FN04%3D","line":83,"updated":"2013-11-12 18:54:13.000000000","message":"Can use map here for a more efficient loop:\n\n    allowed_params \u003d {}\n\n    def filter_for_whitelist(key)\n        # put for-loop contents here\n    map(filter_for_whitelist, whitelist)\n    return allowed_params\n\nThis will be called many times, it deserves a little optimization:\n\nhttps://wiki.python.org/moin/PythonSpeed/PerformanceTips\nhttp://www.python.org/doc/essays/list2str.html\n\nNote that this is not a -1 comment, just an idea.","commit_id":"eb26c904d48cb7fd6591a0f91836105b04822ee5"}],"heat/db/sqlalchemy/api.py":[{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"2164c84e77795aef780067e4ab8fc04bdb928c53","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    default_sort_keys \u003d [\u0027created_at\u0027]"},{"line_number":257,"context_line":"    if not sort_keys:"},{"line_number":258,"context_line":"        sort_keys \u003d default_sort_keys"},{"line_number":259,"context_line":"        sort_dir \u003d \u0027desc\u0027"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":262,"context_line":"    # even for sort_key values that are not unique in the database"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FWPs%3D","line":259,"updated":"2013-11-08 16:16:14.000000000","message":"If user set asc as sort direction ad set no sort_keys, we ignore users sort direction. Is it correct?","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"5c37d9a983d92af76580a7f70171f26571ac60d8","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    default_sort_keys \u003d [\u0027created_at\u0027]"},{"line_number":257,"context_line":"    if not sort_keys:"},{"line_number":258,"context_line":"        sort_keys \u003d default_sort_keys"},{"line_number":259,"context_line":"        sort_dir \u003d \u0027desc\u0027"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":262,"context_line":"    # even for sort_key values that are not unique in the database"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV4M%3D","line":259,"in_reply_to":"AAAATn%2F%2FWPs%3D","updated":"2013-11-08 22:18:19.000000000","message":"Good catch! Will be fixed on next patch set.","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"2164c84e77795aef780067e4ab8fc04bdb928c53","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":262,"context_line":"    # even for sort_key values that are not unique in the database"},{"line_number":263,"context_line":"    sort_keys +\u003d [\u0027id\u0027]"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    stack_marker \u003d None"},{"line_number":266,"context_line":"    if marker:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FWQM%3D","line":263,"updated":"2013-11-08 16:16:14.000000000","message":"nit: use list.append() here","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"5c37d9a983d92af76580a7f70171f26571ac60d8","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":262,"context_line":"    # even for sort_key values that are not unique in the database"},{"line_number":263,"context_line":"    sort_keys +\u003d [\u0027id\u0027]"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    stack_marker \u003d None"},{"line_number":266,"context_line":"    if marker:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FV4I%3D","line":263,"in_reply_to":"AAAATn%2F%2FWQM%3D","updated":"2013-11-08 22:18:19.000000000","message":"done","commit_id":"8eddd1676761246786c308c6d5c5281fc366ed4f"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"93098e21abc5444b342d555e6bb020d0a41855db","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        if not sort_dir:"},{"line_number":260,"context_line":"            sort_dir \u003d \u0027desc\u0027"},{"line_number":261,"context_line":"    elif not isinstance(sort_keys, list):"},{"line_number":262,"context_line":"        sort_keys \u003d [sort_keys]"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":265,"context_line":"    # even for sort_key values that are not unique in the database"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FTE0%3D","line":262,"updated":"2013-11-11 13:32:11.000000000","message":"Not tested","commit_id":"b77047ea4aa35f4a285794069e2249b954e492e0"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"93098e21abc5444b342d555e6bb020d0a41855db","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    stack_marker \u003d None"},{"line_number":269,"context_line":"    if marker:"},{"line_number":270,"context_line":"        stack_marker \u003d model_query(context, models.Stack).get(marker)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    query \u003d utils.paginate_query(query, models.Stack, limit, sort_keys,"},{"line_number":273,"context_line":"                                 stack_marker, sort_dir)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FTEs%3D","line":270,"updated":"2013-11-11 13:32:11.000000000","message":"Neither is this","commit_id":"b77047ea4aa35f4a285794069e2249b954e492e0"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"578034a503c48708edfe6be22c118aa494726239","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        stack_marker \u003d model_query(context, models.Stack).get(marker)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    query \u003d utils.paginate_query(query, models.Stack, limit, sort_keys,"},{"line_number":273,"context_line":"                                 stack_marker, sort_dir)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    return query"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FPq4%3D","line":273,"updated":"2013-11-12 10:56:10.000000000","message":"We do a lot of extra work here even when there is no limit/sort key/market/direction passed. That is the case with the count call below, which is used by our per-tenant policy code which runs this query with a count(*) on every create, so this is not a cheap addition. I\u0027d like to see something added which allows us to short circuit around all the pagination stuff.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"962aed4627ed1914804c18f6fc555f015d328516","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        stack_marker \u003d model_query(context, models.Stack).get(marker)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    query \u003d utils.paginate_query(query, models.Stack, limit, sort_keys,"},{"line_number":273,"context_line":"                                 stack_marker, sort_dir)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    return query"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FN3k%3D","line":273,"in_reply_to":"AAAATn%2F%2FPq4%3D","updated":"2013-11-12 18:31:33.000000000","message":"Agreed. We\u0027ll move these elsewhere so as to prevent stack_count_* from dealing with pagination stuff.\n\nOn a side note, if nothing gets passed, this only adds a sensible default sort order (created_at) to stack_get_all_by_tenant, so it shouldn\u0027t be that expensive anyway.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":6917,"name":"Bartosz Górski","email":"bartosz@codilime.com","username":"bartosz-gorski"},"change_message_id":"82e5e9363d3d52256510a64d6cd444b554c1baa6","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":261,"context_line":"    # even for sort_key values that are not unique in the database"},{"line_number":262,"context_line":"    sort_keys.append(\u0027id\u0027)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    model_marker \u003d None"},{"line_number":265,"context_line":"    if marker:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FHFg%3D","line":262,"updated":"2013-11-14 10:13:55.000000000","message":"I think in case when sort_keys parameter will be passed as a list (reference to the object) you will change it by adding new item. It will have side effects in environment where the function was called after the execution will be over. I think it is not a good practise.","commit_id":"5c5746f0267e7fc1a0b4b7742110f0271932e38d"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"941e1d80c46af051df3d4839352be69fdd376f04","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":261,"context_line":"    # even for sort_key values that are not unique in the database"},{"line_number":262,"context_line":"    sort_keys \u003d sort_keys + [\u0027id\u0027]"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    model_marker \u003d None"},{"line_number":265,"context_line":"    if marker:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FC%2FU%3D","line":262,"updated":"2013-11-15 07:43:06.000000000","message":"It is ok, but use append in such case - it is more `pythonic`\n\n    sort_keys.append(\u0027id\u0027)","commit_id":"0ab4a74e9736e7eb2a483eaa83a4cafe9709c420"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"497dbccc28cd027c7d1d6b6043c636080264a745","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    # This assures the order of the stacks will always be the same"},{"line_number":261,"context_line":"    # even for sort_key values that are not unique in the database"},{"line_number":262,"context_line":"    sort_keys \u003d sort_keys + [\u0027id\u0027]"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    model_marker \u003d None"},{"line_number":265,"context_line":"    if marker:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FB4M%3D","line":262,"in_reply_to":"AAAATn%2F%2FC%2FU%3D","updated":"2013-11-15 13:10:48.000000000","message":"Yeah, the problem with using ``append`` (or even ``+\u003d``, for that matter) is that it would change ``sort_keys`` itself, thus also changing it on the environment it was called. \u003d(","commit_id":"0ab4a74e9736e7eb2a483eaa83a4cafe9709c420"}],"heat/tests/test_api_cfn_v1.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"578034a503c48708edfe6be22c118aa494726239","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        mock_call.assert_called_once_with(dummy_req.context, self.topic,"},{"line_number":136,"context_line":"                                          {\u0027namespace\u0027: None,"},{"line_number":137,"context_line":"                                           \u0027method\u0027: \u0027list_stacks\u0027,"},{"line_number":138,"context_line":"                                           \u0027args\u0027: mock.ANY,"},{"line_number":139,"context_line":"                                           \u0027version\u0027: self.api_version},"},{"line_number":140,"context_line":"                                          None)"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FPqg%3D","line":138,"updated":"2013-11-12 10:56:10.000000000","message":"I dislike making tests more permissive unless there is a very compelling reason. If there is one, can you state it in the commit message? Otherwise it seems like we could still specify the expected arguments here.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"962aed4627ed1914804c18f6fc555f015d328516","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        mock_call.assert_called_once_with(dummy_req.context, self.topic,"},{"line_number":136,"context_line":"                                          {\u0027namespace\u0027: None,"},{"line_number":137,"context_line":"                                           \u0027method\u0027: \u0027list_stacks\u0027,"},{"line_number":138,"context_line":"                                           \u0027args\u0027: mock.ANY,"},{"line_number":139,"context_line":"                                           \u0027version\u0027: self.api_version},"},{"line_number":140,"context_line":"                                          None)"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FOOM%3D","line":138,"in_reply_to":"AAAATn%2F%2FPqg%3D","updated":"2013-11-12 18:31:33.000000000","message":"Could you clarify if this comment is only about this specific test or all tests in this file?\n\nWe think it makes sense that we list the parameters here, but not on the other two tests. The goal of the other two tests is to test for the raised errors, not the call args of the RPC api. Plus, if it\u0027s already being tested here, there\u0027s no benefit to duplicating these assertions.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"}],"heat/tests/test_api_openstack_v1.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"578034a503c48708edfe6be22c118aa494726239","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            \u0027sort_keys\u0027: \u0027fake sort keys\u0027,"},{"line_number":355,"context_line":"            \u0027marker\u0027: \u0027fake marker\u0027,"},{"line_number":356,"context_line":"            \u0027sort_dir\u0027: \u0027fake sort dir\u0027,"},{"line_number":357,"context_line":"            \u0027balrog\u0027: \u0027you shall not pass!\u0027"},{"line_number":358,"context_line":"        }"},{"line_number":359,"context_line":"        req \u003d self._get(\u0027/stacks\u0027, params\u003dparams)"},{"line_number":360,"context_line":"        mock_call.return_value \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FPqc%3D","line":357,"updated":"2013-11-12 10:56:10.000000000","message":"winning. :)","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"578034a503c48708edfe6be22c118aa494726239","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        mock_call.assert_called_once_with(req.context, self.topic,"},{"line_number":427,"context_line":"                                          {\u0027namespace\u0027: None,"},{"line_number":428,"context_line":"                                          \u0027method\u0027: \u0027list_stacks\u0027,"},{"line_number":429,"context_line":"                                          \u0027args\u0027: mock.ANY,"},{"line_number":430,"context_line":"                                          \u0027version\u0027: self.api_version},"},{"line_number":431,"context_line":"                                          None)"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FPqY%3D","line":429,"updated":"2013-11-12 10:56:10.000000000","message":"same question/comment as the other place, why permit more?","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"962aed4627ed1914804c18f6fc555f015d328516","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        mock_call.assert_called_once_with(req.context, self.topic,"},{"line_number":427,"context_line":"                                          {\u0027namespace\u0027: None,"},{"line_number":428,"context_line":"                                          \u0027method\u0027: \u0027list_stacks\u0027,"},{"line_number":429,"context_line":"                                          \u0027args\u0027: mock.ANY,"},{"line_number":430,"context_line":"                                          \u0027version\u0027: self.api_version},"},{"line_number":431,"context_line":"                                          None)"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FONw%3D","line":429,"in_reply_to":"AAAATn%2F%2FPqY%3D","updated":"2013-11-12 18:31:33.000000000","message":"same reply from previous comment! \u003d)","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"}],"heat/tests/test_api_openstack_v1_util.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"578034a503c48708edfe6be22c118aa494726239","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_doesnt_add_emtpy_values_in_whitelist(self):"},{"line_number":50,"context_line":"        result \u003d util.get_allowed_params(self.params, self.whitelist)"},{"line_number":51,"context_line":"        self.assertNotIn(\u0027foo\u0027, result)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FPqM%3D","line":51,"updated":"2013-11-12 10:56:10.000000000","message":"just a thought, I think you could use testscenarios for this file and probably reduce it to one test and a line per scenario. not required though, these tests are very readable.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"962aed4627ed1914804c18f6fc555f015d328516","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_doesnt_add_emtpy_values_in_whitelist(self):"},{"line_number":50,"context_line":"        result \u003d util.get_allowed_params(self.params, self.whitelist)"},{"line_number":51,"context_line":"        self.assertNotIn(\u0027foo\u0027, result)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FN%2Fw%3D","line":51,"in_reply_to":"AAAATn%2F%2FPqM%3D","updated":"2013-11-12 18:31:33.000000000","message":"Thanks for the tip.  We took a look at testscenarios, but we think in this case, these tests benefit more from the readability of writing them out than the conciseness provided by testscenarios.","commit_id":"2a760c8e0b105c5be742e4c72cae4fcf7b8340b6"}],"heat/tests/unit/api/openstack/v1/util.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"b7bce605802731782f9c13e5670299394f314ce6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from heat.common.wsgi import Request"},{"line_number":17,"context_line":"from heat.tests.common import HeatTestCase"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestGetAllowedParams(HeatTestCase):"},{"line_number":21,"context_line":"    def setUp(self):"},{"line_number":22,"context_line":"        super(TestGetAllowedParams, self).setUp()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FRxA%3D","line":19,"updated":"2013-11-11 20:46:58.000000000","message":"Why does this test create a new path, instead of creating a test_api_openstack_v1_util.py test in heat/tests?\n\nSpreading new tests around is a bad idea IMO, we should stick to the current directory structure, unless a decision is made to do a wholesale re-structure of the test heirarchy/structure.","commit_id":"289a1263d23e8d6c8b7b0f36ba5c89511213b5fd"}]}
