)]}'
{"keystone/tests/unit/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"72cd6483bf384ac6394dbb6c2cd73cba5aa35197","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def _assert_expected_status(f):"},{"line_number":488,"context_line":"    \"\"\"Add \"expected status as an argument to the test_client methods."},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    `expected_status` must be passed as a kwarg."},{"line_number":491,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_ee689a88","line":488,"range":{"start_line":488,"start_character":11,"end_line":488,"end_character":12},"updated":"2018-06-26 20:54:21.000000000","message":"nit: Missing another \" or is expected status supposed to be a literal?","commit_id":"739d2b257a10e7c1ca44cbfa1887d515d05eba8e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"81be9924a0cf862aba093cf1f8bb2dee1d269a58","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def _assert_expected_status(f):"},{"line_number":488,"context_line":"    \"\"\"Add \"expected status as an argument to the test_client methods."},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    `expected_status` must be passed as a kwarg."},{"line_number":491,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_8420e79b","line":488,"range":{"start_line":488,"start_character":11,"end_line":488,"end_character":12},"in_reply_to":"5f7c97a3_ee689a88","updated":"2018-06-26 21:38:16.000000000","message":"was supposed to be a literal.","commit_id":"739d2b257a10e7c1ca44cbfa1887d515d05eba8e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"72cd6483bf384ac6394dbb6c2cd73cba5aa35197","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        response \u003d f(*args, **kwargs)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        # Logic to verify the response object is sane. Expand as needed"},{"line_number":498,"context_line":"        if response.status_code \u003d\u003d 418:"},{"line_number":499,"context_line":"            # NOTE(morgan): We use 418 internally during tests to indicate"},{"line_number":500,"context_line":"            # an un-routed HTTP call was made. This allows us to avoid"},{"line_number":501,"context_line":"            # misinterpreting HTTP 404 from Flask and HTTP 404 from a"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_4ecaee6d","line":498,"updated":"2018-06-26 20:54:21.000000000","message":"I totally see the value in this type of utility. I just fear it will cause people to think we actually return HTTP 418 in our API somewhere.","commit_id":"739d2b257a10e7c1ca44cbfa1887d515d05eba8e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"81be9924a0cf862aba093cf1f8bb2dee1d269a58","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        response \u003d f(*args, **kwargs)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        # Logic to verify the response object is sane. Expand as needed"},{"line_number":498,"context_line":"        if response.status_code \u003d\u003d 418:"},{"line_number":499,"context_line":"            # NOTE(morgan): We use 418 internally during tests to indicate"},{"line_number":500,"context_line":"            # an un-routed HTTP call was made. This allows us to avoid"},{"line_number":501,"context_line":"            # misinterpreting HTTP 404 from Flask and HTTP 404 from a"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_e430bbeb","line":498,"in_reply_to":"5f7c97a3_4ecaee6d","updated":"2018-06-26 21:38:16.000000000","message":"well, pick another code ;) i like 418 because no one will accidentally \"take\" it for something else. However, the comment below should hopefully explain things if someone hits it.","commit_id":"739d2b257a10e7c1ca44cbfa1887d515d05eba8e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"72cd6483bf384ac6394dbb6c2cd73cba5aa35197","unresolved":false,"context_lines":[{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # NOTE(morgan): any unexpected 404s [not handled by the routed apis"},{"line_number":855,"context_line":"        # is a hard error and should not pass testing."},{"line_number":856,"context_line":"        def page_not_found_teapot(e):"},{"line_number":857,"context_line":"            content \u003d ("},{"line_number":858,"context_line":"                \u0027TEST PROGRAMMING ERROR - Reached a 404 from an unrouted (`%s`\u0027"},{"line_number":859,"context_line":"                \u0027) path. Be sure the test is requesting the right resource \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_2e21b24d","line":856,"updated":"2018-06-26 20:54:21.000000000","message":"nit: missing a closing ] somewhere?","commit_id":"739d2b257a10e7c1ca44cbfa1887d515d05eba8e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"81be9924a0cf862aba093cf1f8bb2dee1d269a58","unresolved":false,"context_lines":[{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # NOTE(morgan): any unexpected 404s [not handled by the routed apis"},{"line_number":855,"context_line":"        # is a hard error and should not pass testing."},{"line_number":856,"context_line":"        def page_not_found_teapot(e):"},{"line_number":857,"context_line":"            content \u003d ("},{"line_number":858,"context_line":"                \u0027TEST PROGRAMMING ERROR - Reached a 404 from an unrouted (`%s`\u0027"},{"line_number":859,"context_line":"                \u0027) path. Be sure the test is requesting the right resource \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_c44fbf67","line":856,"in_reply_to":"5f7c97a3_2e21b24d","updated":"2018-06-26 21:38:16.000000000","message":"should have been a comma.","commit_id":"739d2b257a10e7c1ca44cbfa1887d515d05eba8e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d7f01bbc3a5b816b88eb6c95e1cd558ba746bc5","unresolved":false,"context_lines":[{"line_number":491,"context_line":"    \"\"\""},{"line_number":492,"context_line":"    @functools.wraps(f)"},{"line_number":493,"context_line":"    def inner(*args, **kwargs):"},{"line_number":494,"context_line":"        expected_status_code \u003d kwargs.pop(\u0027expected_status_code\u0027, 200)"},{"line_number":495,"context_line":"        response \u003d f(*args, **kwargs)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        # Logic to verify the response object is sane. Expand as needed"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_221e15bb","line":494,"range":{"start_line":494,"start_character":66,"end_line":494,"end_character":69},"updated":"2018-07-03 18:51:54.000000000","message":"I think in the existing implementation of self.get/post/put/patch/delete, we actually fit the default to the appropriate HTTP method (e.g. 200 for GET, 201 for post, 204 for delete, etc..)\n\nIt looks like this is going to default to 200 for everything, not just self.get()\n\nIt would be nice to maintain that otherwise we might have to go through and add it.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"1b2c8d585d2c0e0a271f484d4acbcff38a6613ff","unresolved":false,"context_lines":[{"line_number":491,"context_line":"    \"\"\""},{"line_number":492,"context_line":"    @functools.wraps(f)"},{"line_number":493,"context_line":"    def inner(*args, **kwargs):"},{"line_number":494,"context_line":"        expected_status_code \u003d kwargs.pop(\u0027expected_status_code\u0027, 200)"},{"line_number":495,"context_line":"        response \u003d f(*args, **kwargs)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        # Logic to verify the response object is sane. Expand as needed"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e57b46f1","line":494,"range":{"start_line":494,"start_character":66,"end_line":494,"end_character":69},"in_reply_to":"5f7c97a3_221e15bb","updated":"2018-07-03 20:26:54.000000000","message":"I can add some detection in a followup [the 404 followup]","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"ddae73ae660f8b9141be857a932121f1859d4e21","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def loadapp(self, name\u003d\u0027public\u0027):"},{"line_number":850,"context_line":"        app \u003d keystone_flask.application.application_factory(name)"},{"line_number":851,"context_line":"        app.testing \u003d True"},{"line_number":852,"context_line":"        app.test_client_class \u003d KeystoneFlaskTestClient"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # NOTE(morgan): any unexpected 404s [not handled by the routed apis"},{"line_number":855,"context_line":"        # is a hard error and should not pass testing."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_df041c17","line":852,"range":{"start_line":851,"start_character":8,"end_line":852,"end_character":55},"updated":"2018-06-29 15:15:11.000000000","message":"Cool!","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d7f01bbc3a5b816b88eb6c95e1cd558ba746bc5","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        app.testing \u003d True"},{"line_number":852,"context_line":"        app.test_client_class \u003d KeystoneFlaskTestClient"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # NOTE(morgan): any unexpected 404s [not handled by the routed apis"},{"line_number":855,"context_line":"        # is a hard error and should not pass testing."},{"line_number":856,"context_line":"        def page_not_found_teapot(e):"},{"line_number":857,"context_line":"            content \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e2025d72","line":854,"range":{"start_line":854,"start_character":44,"end_line":854,"end_character":45},"updated":"2018-07-03 18:51:54.000000000","message":"nit: missing a closing ]?","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"1b2c8d585d2c0e0a271f484d4acbcff38a6613ff","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        app.testing \u003d True"},{"line_number":852,"context_line":"        app.test_client_class \u003d KeystoneFlaskTestClient"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # NOTE(morgan): any unexpected 404s [not handled by the routed apis"},{"line_number":855,"context_line":"        # is a hard error and should not pass testing."},{"line_number":856,"context_line":"        def page_not_found_teapot(e):"},{"line_number":857,"context_line":"            content \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_25db7eea","line":854,"range":{"start_line":854,"start_character":44,"end_line":854,"end_character":45},"in_reply_to":"5f7c97a3_e2025d72","updated":"2018-07-03 20:26:54.000000000","message":"In followup.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1d7f01bbc3a5b816b88eb6c95e1cd558ba746bc5","unresolved":false,"context_lines":[{"line_number":861,"context_line":"                flask.request.url)"},{"line_number":862,"context_line":"            return content, 418"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        app.register_error_handler(404, page_not_found_teapot)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        self.test_client \u003d app.test_client"},{"line_number":867,"context_line":"        self.cleanup_instance(\u0027test_client\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e227bd1d","line":864,"range":{"start_line":864,"start_character":35,"end_line":864,"end_character":38},"updated":"2018-07-03 18:51:54.000000000","message":"nit: we usually rely on http_client from six instead of setting these ourselves.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"1b2c8d585d2c0e0a271f484d4acbcff38a6613ff","unresolved":false,"context_lines":[{"line_number":861,"context_line":"                flask.request.url)"},{"line_number":862,"context_line":"            return content, 418"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        app.register_error_handler(404, page_not_found_teapot)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        self.test_client \u003d app.test_client"},{"line_number":867,"context_line":"        self.cleanup_instance(\u0027test_client\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_a5e8ee7a","line":864,"range":{"start_line":864,"start_character":35,"end_line":864,"end_character":38},"in_reply_to":"5f7c97a3_e227bd1d","updated":"2018-07-03 20:26:54.000000000","message":"This was a case where things got wonky, http_client was presenting more than a strict int \"404\". We can fix this/enhance in a followup.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"}],"keystone/tests/unit/test_versions.py":[{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"ddae73ae660f8b9141be857a932121f1859d4e21","unresolved":false,"context_lines":[{"line_number":751,"context_line":"        # NOTE(morgan): This test should be kept, v2.0 is removed and should"},{"line_number":752,"context_line":"        # never return, this prevents regression[s]/v2.0 discovery doc"},{"line_number":753,"context_line":"        # slipping back in."},{"line_number":754,"context_line":"        client \u003d TestClient(self.public_app)"},{"line_number":755,"context_line":"        # request to /v2.0 should fail"},{"line_number":756,"context_line":"        resp \u003d client.get(\u0027/v2.0/\u0027)"},{"line_number":757,"context_line":"        # NOTE(morgan): getting a 418 here is indicative of a 404, but from"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_bf6280d8","line":754,"range":{"start_line":754,"start_character":8,"end_line":754,"end_character":44},"updated":"2018-06-29 15:15:11.000000000","message":"Let\u0027s see if I understood correctly. The KeystoneFlaskTestClient will raise an AssertionError on 418, but because here we\u0027re using the in-module TestClient who doesn\u0027t raise, therefore we actually get returned a 418 rather than an AssertionError?","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"7d209beb27943db790eb5b6efc2c0726108c6f78","unresolved":false,"context_lines":[{"line_number":751,"context_line":"        # NOTE(morgan): This test should be kept, v2.0 is removed and should"},{"line_number":752,"context_line":"        # never return, this prevents regression[s]/v2.0 discovery doc"},{"line_number":753,"context_line":"        # slipping back in."},{"line_number":754,"context_line":"        client \u003d TestClient(self.public_app)"},{"line_number":755,"context_line":"        # request to /v2.0 should fail"},{"line_number":756,"context_line":"        resp \u003d client.get(\u0027/v2.0/\u0027)"},{"line_number":757,"context_line":"        # NOTE(morgan): getting a 418 here is indicative of a 404, but from"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_8c275764","line":754,"range":{"start_line":754,"start_character":8,"end_line":754,"end_character":44},"in_reply_to":"5f7c97a3_bf6280d8","updated":"2018-06-29 20:20:46.000000000","message":"Yep. The clear reason is we want to expect a 418 and rather than capturing the AssertionError this is more straightforward.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"ddae73ae660f8b9141be857a932121f1859d4e21","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        resp \u003d client.get(\u0027/v2.0/\u0027)"},{"line_number":757,"context_line":"        # NOTE(morgan): getting a 418 here is indicative of a 404, but from"},{"line_number":758,"context_line":"        # the flask app itself (not a handled 404 such as UserNotFound)"},{"line_number":759,"context_line":"        self.assertEqual(418, resp.status_int)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"        # request to /v3 should pass"},{"line_number":762,"context_line":"        resp \u003d client.get(\u0027/v3/\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_04a00942","line":759,"range":{"start_line":759,"start_character":25,"end_line":759,"end_character":28},"updated":"2018-06-29 15:15:11.000000000","message":"I\u0027d like to see the 418 value stored in a global var and then referenced from there, both here and in core.py, can be done in a follow up since this review stack is pretty long.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"7d209beb27943db790eb5b6efc2c0726108c6f78","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        resp \u003d client.get(\u0027/v2.0/\u0027)"},{"line_number":757,"context_line":"        # NOTE(morgan): getting a 418 here is indicative of a 404, but from"},{"line_number":758,"context_line":"        # the flask app itself (not a handled 404 such as UserNotFound)"},{"line_number":759,"context_line":"        self.assertEqual(418, resp.status_int)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"        # request to /v3 should pass"},{"line_number":762,"context_line":"        resp \u003d client.get(\u0027/v3/\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_4c193f21","line":759,"range":{"start_line":759,"start_character":25,"end_line":759,"end_character":28},"in_reply_to":"5f7c97a3_04a00942","updated":"2018-06-29 20:20:46.000000000","message":"Yeah, we can do that in a followup.","commit_id":"1bcc8a11c8f3fba70cdc4b8c6992b20a423aba48"}]}
