)]}'
{"keystonemiddleware/audit.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5d09effbfdb059e83269f3aeff1f20c949eff965","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import sys"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from oslo_config import cfg"},{"line_number":31,"context_line":"from oslo_context import context as oslo_context"},{"line_number":32,"context_line":"try:"},{"line_number":33,"context_line":"    import oslo_messaging"},{"line_number":34,"context_line":"    messaging \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af94dfe_c39a0563","line":31,"updated":"2016-03-16 22:40:15.000000000","message":"I think this is not strictly necessary as of this patchset, since _emit_audit is the only method using a local variable called \u0027context\u0027 and it does not also refer to oslo.context","commit_id":"247d8005b57899bc17fa5ad85c511179a0f5a1be"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"aab15c21c3cb3e8683b79f87e959871a10366044","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import sys"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from oslo_config import cfg"},{"line_number":31,"context_line":"from oslo_context import context as oslo_context"},{"line_number":32,"context_line":"try:"},{"line_number":33,"context_line":"    import oslo_messaging"},{"line_number":34,"context_line":"    messaging \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af94dfe_83191d8b","line":31,"in_reply_to":"1af94dfe_c39a0563","updated":"2016-03-16 22:57:58.000000000","message":"Fair, but it was done for sake of clarity. When a oslo context is made it is now clear that this is what is happening. There are a couple of possible \u0027context\u0027s to choose from.","commit_id":"247d8005b57899bc17fa5ad85c511179a0f5a1be"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"49f81f7aca46e7611b9f93aa5334ff59d6aa2e2d","unresolved":false,"context_lines":[{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        # Cannot use a RequestClass on wsgify above because the `req` object is"},{"line_number":431,"context_line":"        # a `WebOb.Request` when this method is called so the RequestClass is"},{"line_number":432,"context_line":"        # ignored by the wsgify wrapper."},{"line_number":433,"context_line":"        req.context \u003d oslo_context.get_admin_context().to_dict()"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        self._process_request(req)"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_28b704f6","line":432,"updated":"2016-05-11 01:02:12.000000000","message":"I\u0027m not sure i follow this. What is calling your middleware with an existing WebOb.Request?\n\nIf it\u0027s your tests (the only thing i can imagine) then you should be calling them as request.get_response(middleware) rather than doing a __call__ directly to emulate proper wsgi protocol.","commit_id":"247d8005b57899bc17fa5ad85c511179a0f5a1be"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"6d841ac195aa15bd4ce8f0cc038136937e7b13cf","unresolved":false,"context_lines":[{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        # Cannot use a RequestClass on wsgify above because the `req` object is"},{"line_number":431,"context_line":"        # a `WebOb.Request` when this method is called so the RequestClass is"},{"line_number":432,"context_line":"        # ignored by the wsgify wrapper."},{"line_number":433,"context_line":"        req.context \u003d oslo_context.get_admin_context().to_dict()"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        self._process_request(req)"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_480b367d","line":432,"updated":"2016-05-11 19:52:21.000000000","message":"This also does not make sense to me. I would like a bit more clarification on why this is needed.","commit_id":"247d8005b57899bc17fa5ad85c511179a0f5a1be"}],"keystonemiddleware/tests/unit/test_audit_middleware.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"41932b02de209c50d6c7d4cfab5294b27ac3850e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                       \u0027HTTP_X_PROJECT_ID\u0027: \u0027tenant_id\u0027,"},{"line_number":87,"context_line":"                       \u0027HTTP_X_IDENTITY_STATUS\u0027: \u0027Confirmed\u0027}"},{"line_number":88,"context_line":"        env_headers[\u0027REQUEST_METHOD\u0027] \u003d req_type"},{"line_number":89,"context_line":"        env_headers[\u0027audit.context\u0027] \u003d {}"},{"line_number":90,"context_line":"        return env_headers"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_f5f17ace","line":89,"updated":"2015-12-23 15:37:43.000000000","message":"why is this here? Isn\u0027t this supposed to be added automatically by AuditRequest.__init__?","commit_id":"129a8312817a3b372a5500a17bd802ae4751480f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"086e28742e5a1d20e6e21df01e7f44d007deb6e4","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                                  environ\u003dself.get_environ_header(\u0027GET\u0027))"},{"line_number":146,"context_line":"        with mock.patch(\u0027oslo_messaging.Notifier.info\u0027,"},{"line_number":147,"context_line":"                        side_effect\u003dException(\u0027error\u0027)) as notify:"},{"line_number":148,"context_line":"            self.middleware._process_request({}, req)"},{"line_number":149,"context_line":"            self.assertTrue(notify.called)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def test_process_response_fail(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_879359a3","line":148,"updated":"2015-12-29 22:55:52.000000000","message":"give a name to the {} magic value e.g., context \u003d {}\n\nthis also applies at line 157, 240, etc.","commit_id":"893028135c78fa5cceed895a10ecbd03e58ce3a1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"086e28742e5a1d20e6e21df01e7f44d007deb6e4","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                                  environ\u003dself.get_environ_header(\u0027GET\u0027))"},{"line_number":210,"context_line":"        with mock.patch(\u0027oslo_messaging.Notifier.info\u0027) as notify:"},{"line_number":211,"context_line":"            middleware(req)"},{"line_number":212,"context_line":"            # ensure exact same context is used between request and response"},{"line_number":213,"context_line":"            self.assertEqual(notify.call_args_list[0][0][0],"},{"line_number":214,"context_line":"                             notify.call_args_list[1][0][0])"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_07ee8922","line":212,"updated":"2015-12-29 22:55:52.000000000","message":"suggest add a comment that the context is the first argument to Notifier.info() so that we have some idea where the 0s and 1s are coming from.","commit_id":"893028135c78fa5cceed895a10ecbd03e58ce3a1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"086e28742e5a1d20e6e21df01e7f44d007deb6e4","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        with mock.patch(\u0027oslo_messaging.Notifier.info\u0027) as notify:"},{"line_number":211,"context_line":"            middleware(req)"},{"line_number":212,"context_line":"            # ensure exact same context is used between request and response"},{"line_number":213,"context_line":"            self.assertEqual(notify.call_args_list[0][0][0],"},{"line_number":214,"context_line":"                             notify.call_args_list[1][0][0])"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def test_cadf_event_scoped_to_request(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_478d617a","line":213,"updated":"2015-12-29 22:55:52.000000000","message":"if they\u0027re supposed to be the same object could use assertIs.","commit_id":"893028135c78fa5cceed895a10ecbd03e58ce3a1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"086e28742e5a1d20e6e21df01e7f44d007deb6e4","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            middleware(req)"},{"line_number":212,"context_line":"            # ensure exact same context is used between request and response"},{"line_number":213,"context_line":"            self.assertEqual(notify.call_args_list[0][0][0],"},{"line_number":214,"context_line":"                             notify.call_args_list[1][0][0])"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def test_cadf_event_scoped_to_request(self):"},{"line_number":217,"context_line":"        middleware \u003d audit.AuditMiddleware("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_67dd0570","line":214,"updated":"2015-12-29 22:55:52.000000000","message":"I\u0027m worried this test could be broken and still pass. It would help if the type of the argument was also verified, e.g., assertIsInstance(notify.call_args_list[0][0][0], Context)","commit_id":"893028135c78fa5cceed895a10ecbd03e58ce3a1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"086e28742e5a1d20e6e21df01e7f44d007deb6e4","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        req \u003d webob.Request.blank(\u0027http://public_host:8774/v2/\u0027"},{"line_number":563,"context_line":"                                  + str(uuid.uuid4()) + \u0027/servers\u0027,"},{"line_number":564,"context_line":"                                  environ\u003denv_headers)"},{"line_number":565,"context_line":"        self.middleware._process_request({}, req)"},{"line_number":566,"context_line":"        payload \u003d req.environ[\u0027cadf_event\u0027].as_dict()"},{"line_number":567,"context_line":"        self.assertEqual((payload[\u0027target\u0027][\u0027addresses\u0027][0][\u0027url\u0027]), \"unknown\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_47e4813a","line":565,"updated":"2015-12-29 22:55:52.000000000","message":"if context had a default then these tests wouldn\u0027t all have to change.","commit_id":"893028135c78fa5cceed895a10ecbd03e58ce3a1"}]}
