)]}'
{"keystone/tests/unit/test_middleware.py":[{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"ca621c6f41f216bd40e8a87eab117c93400a2e12","unresolved":false,"context_lines":[{"line_number":713,"context_line":"                        \u0027request environment.\u0027 %"},{"line_number":714,"context_line":"                        CONF.tokenless_auth.issuer_attribute)"},{"line_number":715,"context_line":"        # Check the content of the exception message as well"},{"line_number":716,"context_line":"        self.assertRaisesRegexp(exception.TokenlessAuthConfigError,"},{"line_number":717,"context_line":"                                expected_msg,"},{"line_number":718,"context_line":"                                auth._build_idp_id)"},{"line_number":719,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_dffe2137","side":"PARENT","line":716,"range":{"start_line":716,"start_character":8,"end_line":716,"end_character":31},"updated":"2017-05-19 15:09:39.000000000","message":"I\u0027m pretty sure that this is actually calling [0] rather than the python 3 library call (which was renamed to assertRaisesRegex) but they are named the same. It looks like this might have been done for compatibility between python 2 \u0026 3.\n\nIt looks like assertRaisesRegexp was only used here though, so if we can change it to assertRaisesRegex I wonder if we can remove [0] as well.\n\nI am also curious about how this passes the py27 gate, assertRaisesRegex isn\u0027t part of python 2 from what I can tell.\n\n[0] https://github.com/openstack/keystone/blob/646a42d5a684d78ed40cfba1f4ce09cfc414febb/keystone/tests/unit/core.py#L792","commit_id":"4418fe3cfa368e15f5f72e32f52bbf4779f6d704"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"53ec19b2bfdaeb0f30cd551527dd348e43cf1bc4","unresolved":false,"context_lines":[{"line_number":713,"context_line":"                        \u0027request environment.\u0027 %"},{"line_number":714,"context_line":"                        CONF.tokenless_auth.issuer_attribute)"},{"line_number":715,"context_line":"        # Check the content of the exception message as well"},{"line_number":716,"context_line":"        self.assertRaisesRegexp(exception.TokenlessAuthConfigError,"},{"line_number":717,"context_line":"                                expected_msg,"},{"line_number":718,"context_line":"                                auth._build_idp_id)"},{"line_number":719,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_0ddaef4a","side":"PARENT","line":716,"range":{"start_line":716,"start_character":8,"end_line":716,"end_character":31},"in_reply_to":"ff0f0b1f_aa20b0b1","updated":"2017-05-22 22:48:39.000000000","message":"Took another look at this, I think six is doing some alias\u0027ing behind the scenes [0].\n\nI\u0027m not sure if this should be changed, maybe someone who knows [1] better can weigh in.\n\n[0]https://media.readthedocs.org/pdf/six/latest/six.pdf#page\u003d14\n\n[1] https://github.com/openstack/keystone/blob/646a42d5a684d78ed40cfba1f4ce09cfc414febb/keystone/tests/unit/core.py#L792","commit_id":"4418fe3cfa368e15f5f72e32f52bbf4779f6d704"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"1143806dae9f4a42a6d2d5252985f2879d4ca922","unresolved":false,"context_lines":[{"line_number":713,"context_line":"                        \u0027request environment.\u0027 %"},{"line_number":714,"context_line":"                        CONF.tokenless_auth.issuer_attribute)"},{"line_number":715,"context_line":"        # Check the content of the exception message as well"},{"line_number":716,"context_line":"        self.assertRaisesRegexp(exception.TokenlessAuthConfigError,"},{"line_number":717,"context_line":"                                expected_msg,"},{"line_number":718,"context_line":"                                auth._build_idp_id)"},{"line_number":719,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_aa20b0b1","side":"PARENT","line":716,"range":{"start_line":716,"start_character":8,"end_line":716,"end_character":31},"in_reply_to":"ff0f0b1f_dffe2137","updated":"2017-05-21 11:15:24.000000000","message":"Great catch Gage! I am also not sure why this is passing the Python 2.7 gate. I looked into the docs and only assertRaisesRegexp seems to exist for Python 2. This change has been done for keystone client a while ago when we had both 2.6 and 2.7 gates. It would be nice to understand what is doing the magic in the background.\n\n\n[1] https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertRaisesRegexp\n[2] https://review.openstack.org/#/c/168125","commit_id":"4418fe3cfa368e15f5f72e32f52bbf4779f6d704"}]}
