)]}'
{"nova/tests/unit/console/test_websocketproxy.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8260ce5c464c411b33a5252cdeb50aac0c398e68","unresolved":false,"context_lines":[{"line_number":625,"context_line":"        self.wh.path \u003d \"https://127.0.0.1/\""},{"line_number":626,"context_line":"        self.wh.headers \u003d self.fake_header"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":629,"context_line":"                          self.wh.new_websocket_client)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandlerBase.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_84afefe1","line":628,"updated":"2019-01-16 16:34:46.000000000","message":"This is an example of a negative test, where X-Forwarded-Proto is not present, access_url_base is \u0027ws\u0027 and Origin scheme is \u0027https\u0027 (see self.fake_header).\n\nIf X-Forwarded-Proto were present and \u0027http\u0027 or \u0027ws\u0027, this test would not raise ValidationError.","commit_id":"890e2d320e8e8e7b501af8e21cc6b751fb204d04"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b916a06480447a4077600145a03d15d9cd53c86a","unresolved":false,"context_lines":[{"line_number":648,"context_line":"            \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":649,"context_line":"            \u0027Origin\u0027: \u0027http://example.net:6080\u0027,"},{"line_number":650,"context_line":"            \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":651,"context_line":"            \u0027X-Forwarded-Proto\u0027: \u0027https\u0027"},{"line_number":652,"context_line":"        }"},{"line_number":653,"context_line":"        self.wh.socket.return_value \u003d \u0027\u003csocket\u003e\u0027"},{"line_number":654,"context_line":"        self.wh.path \u003d \"https://127.0.0.1/\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_b3d11efe","line":651,"updated":"2019-01-16 11:55:57.000000000","message":"This test fails if this line is removed, but the failure is an exception, not an explicit assertion failure where some expectation has not been met. Not sure if that really matters, but I mention it because it was non-obvious from just reading this test that the thing being changed was actually being tested, so I brought down the code and messed with the test.\n\nIf there\u0027s an easy way to assert things, or to add a negative test, that might make things more clear.\n\nHowever that would be really pushing the boat out, so I don\u0027t think it is truly necessary.","commit_id":"890e2d320e8e8e7b501af8e21cc6b751fb204d04"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6d0e3eac28d314b61d6d4cd2055e805ea1ebe068","unresolved":false,"context_lines":[{"line_number":648,"context_line":"            \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":649,"context_line":"            \u0027Origin\u0027: \u0027http://example.net:6080\u0027,"},{"line_number":650,"context_line":"            \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":651,"context_line":"            \u0027X-Forwarded-Proto\u0027: \u0027https\u0027"},{"line_number":652,"context_line":"        }"},{"line_number":653,"context_line":"        self.wh.socket.return_value \u003d \u0027\u003csocket\u003e\u0027"},{"line_number":654,"context_line":"        self.wh.path \u003d \"https://127.0.0.1/\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_e45fdb6f","line":651,"in_reply_to":"bfdaf3ff_24bc03ba","updated":"2019-01-16 16:50:13.000000000","message":"OK, thanks. I shall leave it then.","commit_id":"890e2d320e8e8e7b501af8e21cc6b751fb204d04"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8260ce5c464c411b33a5252cdeb50aac0c398e68","unresolved":false,"context_lines":[{"line_number":648,"context_line":"            \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":649,"context_line":"            \u0027Origin\u0027: \u0027http://example.net:6080\u0027,"},{"line_number":650,"context_line":"            \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":651,"context_line":"            \u0027X-Forwarded-Proto\u0027: \u0027https\u0027"},{"line_number":652,"context_line":"        }"},{"line_number":653,"context_line":"        self.wh.socket.return_value \u003d \u0027\u003csocket\u003e\u0027"},{"line_number":654,"context_line":"        self.wh.path \u003d \"https://127.0.0.1/\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_e4259bac","line":651,"in_reply_to":"bfdaf3ff_b3d11efe","updated":"2019-01-16 16:34:46.000000000","message":"The way I approached this was, without the fix to the implementation, this test fails, with the fix, it passes. AFAICT, the assertion we\u0027d need here is, \"assertDoesNotRaise(exception.ValidationError, ...\".\n\nGoogling suggests I could do this:\n\n try:\n     self.wh.new_websocket_client()\n except exception.ValidationError:\n     self.fail(\u0027new_websocket_client() raised ValidationError unexpectedly\u0027)\n\nDoes that sound OK?","commit_id":"890e2d320e8e8e7b501af8e21cc6b751fb204d04"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8303c4d2c98ec31fe15b3b0899a1761cc8be5177","unresolved":false,"context_lines":[{"line_number":648,"context_line":"            \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":649,"context_line":"            \u0027Origin\u0027: \u0027http://example.net:6080\u0027,"},{"line_number":650,"context_line":"            \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":651,"context_line":"            \u0027X-Forwarded-Proto\u0027: \u0027https\u0027"},{"line_number":652,"context_line":"        }"},{"line_number":653,"context_line":"        self.wh.socket.return_value \u003d \u0027\u003csocket\u003e\u0027"},{"line_number":654,"context_line":"        self.wh.path \u003d \"https://127.0.0.1/\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_24bc03ba","line":651,"in_reply_to":"bfdaf3ff_e4259bac","updated":"2019-01-16 16:39:27.000000000","message":"I\u0027d only bother if you\u0027re feeling super motivated. It was just something I noticed but I don\u0027t think it is critical.","commit_id":"890e2d320e8e8e7b501af8e21cc6b751fb204d04"}]}
