)]}'
{"keystone/tests/rest.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"58d7fdaf26b06a4ed06844e8dcafda527b071a0a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\"Ensures that response headers appear as expected.\"\"\""},{"line_number":137,"context_line":"        self.assertIn(\u0027X-Auth-Token\u0027, response.headers.get(\u0027Vary\u0027))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def assertValidErrorResponse(self, response):"},{"line_number":140,"context_line":"        self.assertEqual(response.status_code, 400)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _to_content_type(self, body, headers, content_type\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F87FY%3D","line":139,"updated":"2013-12-18 18:32:59.000000000","message":"assertValidErrorResponse and just checking for 400 doesn\u0027t seem right as \"error response\" can be anything (i.e. in the 400 range).\n\nI know this patch is just for moving code around. But can we improve it a bit. Either name the method accordingly (i.e. assertBadRequestResponse) or do something generic. For example,\n\ndef assertValidErrorResponse(self, response, expected_status\u003d400):\n    if expected_status is not None:\n        self.assertEqual(response.status_code, expected_status)\n    else:\n        # anything in the 400 range is bad\n        self.assertGreaterEqual(response.status_code, 400)","commit_id":"648eb87e91bc75d293f8ab60cc3ceb64c71b805c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c815d3fe6cddf5b66fe03b82a6403fe0fe84465c","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\"Ensures that response headers appear as expected.\"\"\""},{"line_number":137,"context_line":"        self.assertIn(\u0027X-Auth-Token\u0027, response.headers.get(\u0027Vary\u0027))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def assertValidErrorResponse(self, response):"},{"line_number":140,"context_line":"        self.assertEqual(response.status_code, 400)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _to_content_type(self, body, headers, content_type\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fsug%3D","line":139,"in_reply_to":"AAAAT3%2F%2F0G0%3D","updated":"2014-01-09 13:40:58.000000000","message":"an inline comment explaining why it\u0027s overriding the parent method with just a check for 400\u0027s would have avoided the confusion here","commit_id":"648eb87e91bc75d293f8ab60cc3ceb64c71b805c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"68b68a7c33da3a3ab18d6a6d50410d329cc61fa4","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\"Ensures that response headers appear as expected.\"\"\""},{"line_number":137,"context_line":"        self.assertIn(\u0027X-Auth-Token\u0027, response.headers.get(\u0027Vary\u0027))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def assertValidErrorResponse(self, response):"},{"line_number":140,"context_line":"        self.assertEqual(response.status_code, 400)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _to_content_type(self, body, headers, content_type\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FJsw%3D","line":139,"in_reply_to":"AAAATn%2F87FY%3D","updated":"2014-01-16 23:03:41.000000000","message":"Done","commit_id":"648eb87e91bc75d293f8ab60cc3ceb64c71b805c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1f245eaa8606362e6e2370c569a3f803d7b81335","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\"Ensures that response headers appear as expected.\"\"\""},{"line_number":137,"context_line":"        self.assertIn(\u0027X-Auth-Token\u0027, response.headers.get(\u0027Vary\u0027))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def assertValidErrorResponse(self, response):"},{"line_number":140,"context_line":"        self.assertEqual(response.status_code, 400)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _to_content_type(self, body, headers, content_type\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F0G0%3D","line":139,"in_reply_to":"AAAATn%2F87FY%3D","updated":"2013-12-30 23:55:31.000000000","message":"This method is overridden in test_v3.RestfulTestCase so I don\u0027t think I can rename it -- http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/test_v3.py?id\u003dd38942de2f1a32d10a9dbd1d95ddda742ddbdea1#n374","commit_id":"648eb87e91bc75d293f8ab60cc3ceb64c71b805c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"68b68a7c33da3a3ab18d6a6d50410d329cc61fa4","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\"Ensures that response headers appear as expected.\"\"\""},{"line_number":137,"context_line":"        self.assertIn(\u0027X-Auth-Token\u0027, response.headers.get(\u0027Vary\u0027))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def assertValidErrorResponse(self, response):"},{"line_number":140,"context_line":"        self.assertEqual(response.status_code, 400)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _to_content_type(self, body, headers, content_type\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FJss%3D","line":139,"in_reply_to":"AAAAUH%2F%2Fsug%3D","updated":"2014-01-16 23:03:41.000000000","message":"Done","commit_id":"648eb87e91bc75d293f8ab60cc3ceb64c71b805c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f13def417bbdf2baa071612a9c091620372252ef","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # we can save some code \u0026 improve coverage by always doing this"},{"line_number":191,"context_line":"        if method !\u003d \u0027HEAD\u0027 and response.status_code \u003e\u003d 400:"},{"line_number":192,"context_line":"            self.assertValidErrorResponse(response)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        # Contains the decoded response.body"},{"line_number":195,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BJEs%3D","line":192,"updated":"2014-01-29 19:05:39.000000000","message":"this is all IIRC, so correct me if things have changed, but this method isn\u0027t intended to only check the status code -- that\u0027s basically a given. the method is intended to validate the actual body of the response ({\"error\": {\"message\": ...}}). the implementation that you\u0027re deleting in the other module is an exception, for some reason (and shouldn\u0027t be promoted to the implementation in this base class)","commit_id":"221cfd8d3ee48ea4876d5a9cbd2567c7ac64b73f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2f829e8a4a8867045beccd1b5b090568e2cad6de","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # we can save some code \u0026 improve coverage by always doing this"},{"line_number":191,"context_line":"        if method !\u003d \u0027HEAD\u0027 and response.status_code \u003e\u003d 400:"},{"line_number":192,"context_line":"            self.assertValidErrorResponse(response)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        # Contains the decoded response.body"},{"line_number":195,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9s2k%3D","line":192,"in_reply_to":"AAAAUH%2F%2BJEs%3D","updated":"2014-02-04 20:48:10.000000000","message":"I added some more assertions from the subclasses.","commit_id":"221cfd8d3ee48ea4876d5a9cbd2567c7ac64b73f"}]}
