)]}'
{"test/unit/common/test_swob.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a4a626d7dee0a7fdca7444471d23d62c61091907","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1426,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1427,"context_line":"        content \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1428,"context_line":"        self.assertEquals("},{"line_number":1429,"context_line":"            content,"},{"line_number":1430,"context_line":"            \u0027{\"status\": 507, \"description\": \"There was not enough space \u0027"},{"line_number":1431,"context_line":"            \u0027to save the resource. Drive: unknown\", \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_5f1fa407","line":1428,"updated":"2015-07-23 03:46:35.000000000","message":"Do you think it may be better to parse the response with json and compare the actual class? It could be valid no matter how the main code dumps the JSON. Or do we really want to nail the compatibility down to the exact string?","commit_id":"34fc545e8031a5eef1ca35c49f39ffa3b6e331a1"},{"author":{"_account_id":13540,"name":"Azhagu Selvan SP","email":"tamizhgeek@gmail.com","username":"tamizhgeek"},"change_message_id":"980a620aaa372445d32941a77caf260d1fd2460e","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1426,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1427,"context_line":"        content \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1428,"context_line":"        self.assertEquals("},{"line_number":1429,"context_line":"            content,"},{"line_number":1430,"context_line":"            \u0027{\"status\": 507, \"description\": \"There was not enough space \u0027"},{"line_number":1431,"context_line":"            \u0027to save the resource. Drive: unknown\", \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_b0e055ce","line":1428,"in_reply_to":"3a50d1a3_5f1fa407","updated":"2015-07-23 05:15:24.000000000","message":"Yes, you are right! Silly of me to compare the json string to string.","commit_id":"34fc545e8031a5eef1ca35c49f39ffa3b6e331a1"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"2d6a69237cc0d0cd294027ae815a02b65aabb477","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"    def test_507_json_response(self):"},{"line_number":1425,"context_line":"        accept_header \u003d {\u0027accept\u0027: \u0027application/json\u0027}"},{"line_number":1426,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1427,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1428,"context_line":"        content_str \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1429,"context_line":"        content \u003d json.loads(content_str)"},{"line_number":1430,"context_line":"        self.assertEquals(content[\u0027status\u0027], 507)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_caa52da2","line":1427,"updated":"2015-07-29 08:05:35.000000000","message":"I would prefer to test a more common error that is raised more likely, for example a 404 (swob.HTTPNotFound).\n\nAlso, it would be nice to test four types of accept headers:\n\n 1. No header sent (current case; ensures fallback to text/html)\n 2. application/json (this test)\n 3. text/html (just to be sure)\n 4. some weird thing (like \"weird/xml\") to ensure it falls back to text/html\n\nThis hopefully helps to avoid regression in the future.","commit_id":"b667fdd171daa691c81024322ab89e1b2e92aedd"},{"author":{"_account_id":13540,"name":"Azhagu Selvan SP","email":"tamizhgeek@gmail.com","username":"tamizhgeek"},"change_message_id":"41e813a00162ef166d908083e9e1c5faf9db69af","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"    def test_507_json_response(self):"},{"line_number":1425,"context_line":"        accept_header \u003d {\u0027accept\u0027: \u0027application/json\u0027}"},{"line_number":1426,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1427,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1428,"context_line":"        content_str \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1429,"context_line":"        content \u003d json.loads(content_str)"},{"line_number":1430,"context_line":"        self.assertEquals(content[\u0027status\u0027], 507)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_c5d0be21","line":1427,"in_reply_to":"3a50d1a3_caa52da2","updated":"2015-07-29 08:29:30.000000000","message":"The response type is determined by the Accept#best_match method, which is already well tested. That\u0027s why I left out testing that logic. If you still think testing all the four scenarios will help - will be glad to add them in the next patch.","commit_id":"b667fdd171daa691c81024322ab89e1b2e92aedd"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"2d6a69237cc0d0cd294027ae815a02b65aabb477","unresolved":false,"context_lines":[{"line_number":1432,"context_line":"                          \"There was not enough space to save \""},{"line_number":1433,"context_line":"                          \"the resource. Drive: unknown\")"},{"line_number":1434,"context_line":"        self.assertEquals(content[\u0027error\u0027], u\"Insufficient Storage\")"},{"line_number":1435,"context_line":"        self.assertEquals(resp.content_type, \u0027application/json\u0027)"},{"line_number":1436,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq,"},{"line_number":1437,"context_line":"                                                         drive\u003d\u0027sda1\u0027)"},{"line_number":1438,"context_line":"        content_str \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_6ad89953","line":1435,"updated":"2015-07-29 08:05:35.000000000","message":"I think everything below this line is not really needed?","commit_id":"b667fdd171daa691c81024322ab89e1b2e92aedd"},{"author":{"_account_id":13540,"name":"Azhagu Selvan SP","email":"tamizhgeek@gmail.com","username":"tamizhgeek"},"change_message_id":"41e813a00162ef166d908083e9e1c5faf9db69af","unresolved":false,"context_lines":[{"line_number":1432,"context_line":"                          \"There was not enough space to save \""},{"line_number":1433,"context_line":"                          \"the resource. Drive: unknown\")"},{"line_number":1434,"context_line":"        self.assertEquals(content[\u0027error\u0027], u\"Insufficient Storage\")"},{"line_number":1435,"context_line":"        self.assertEquals(resp.content_type, \u0027application/json\u0027)"},{"line_number":1436,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq,"},{"line_number":1437,"context_line":"                                                         drive\u003d\u0027sda1\u0027)"},{"line_number":1438,"context_line":"        content_str \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_4584ae5c","line":1435,"in_reply_to":"3a50d1a3_6ad89953","updated":"2015-07-29 08:29:30.000000000","message":"Hmm, the drive name interpolation is happening on the dumped string now - which everybody thinks is hacky and will change in the future. Don\u0027t you think we need to test for any regression in that specifically?","commit_id":"b667fdd171daa691c81024322ab89e1b2e92aedd"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8063e8eb5c5ad7b549eddd4abd6da7b32858b53d","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"        self.assertEquals(resp.host_url, \u0027https://someother:5678\u0027)"},{"line_number":1408,"context_line":""},{"line_number":1409,"context_line":"    def test_507(self):"},{"line_number":1410,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027)"},{"line_number":1411,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1412,"context_line":"        content \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1413,"context_line":"        self.assertEquals("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_adbf62fb","line":1410,"updated":"2015-07-30 08:02:59.000000000","message":"Could you please undo this? There is no change to this existing test required.","commit_id":"03db7f90afa7b897e14968ff9feae78abcbdd7b4"},{"author":{"_account_id":13540,"name":"Azhagu Selvan SP","email":"tamizhgeek@gmail.com","username":"tamizhgeek"},"change_message_id":"4f7eba209bcc816b4e31110acc761abf0e0c9d22","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"        self.assertEquals(resp.host_url, \u0027https://someother:5678\u0027)"},{"line_number":1408,"context_line":""},{"line_number":1409,"context_line":"    def test_507(self):"},{"line_number":1410,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027)"},{"line_number":1411,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1412,"context_line":"        content \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1413,"context_line":"        self.assertEquals("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_e8a1d847","line":1410,"in_reply_to":"3a50d1a3_adbf62fb","updated":"2015-07-30 08:23:56.000000000","message":"It is required. The response type is determined by the request.accept.best_match method. So a Request object has to be passed now, while instantiating a Response.","commit_id":"03db7f90afa7b897e14968ff9feae78abcbdd7b4"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1eb23ad91f8b1ff3299abb6b0625883464742dad","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"        self.assertEquals(resp.host_url, \u0027https://someother:5678\u0027)"},{"line_number":1408,"context_line":""},{"line_number":1409,"context_line":"    def test_507(self):"},{"line_number":1410,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027)"},{"line_number":1411,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"},{"line_number":1412,"context_line":"        content \u003d \u0027\u0027.join(resp._response_iter(resp.app_iter, resp._body))"},{"line_number":1413,"context_line":"        self.assertEquals("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_3ebb3e77","line":1410,"in_reply_to":"3a50d1a3_e8a1d847","updated":"2015-07-31 09:57:26.000000000","message":"Ah yes, I played with this test on master, you\u0027re right - needed with this patch.","commit_id":"03db7f90afa7b897e14968ff9feae78abcbdd7b4"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8063e8eb5c5ad7b549eddd4abd6da7b32858b53d","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"            \u0027\u003chtml\u003e\u003ch1\u003eInsufficient Storage\u003c/h1\u003e\u003cp\u003eThere was not enough space \u0027"},{"line_number":1423,"context_line":"            \u0027to save the resource. Drive: sda1\u003c/p\u003e\u003c/html\u003e\u0027)"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"    def test_507_json_response(self):"},{"line_number":1426,"context_line":"        accept_header \u003d {\u0027accept\u0027: \u0027application/json\u0027}"},{"line_number":1427,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1428,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_6d8b9a69","line":1425,"updated":"2015-07-30 08:02:59.000000000","message":"I think this test is no longer needed; all the important stuff is covered by the tests below. It might be misleading as well, because one could think that 507 deserve a special way to handle json response. IMO this test can be removed.","commit_id":"03db7f90afa7b897e14968ff9feae78abcbdd7b4"},{"author":{"_account_id":13540,"name":"Azhagu Selvan SP","email":"tamizhgeek@gmail.com","username":"tamizhgeek"},"change_message_id":"4f7eba209bcc816b4e31110acc761abf0e0c9d22","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"            \u0027\u003chtml\u003e\u003ch1\u003eInsufficient Storage\u003c/h1\u003e\u003cp\u003eThere was not enough space \u0027"},{"line_number":1423,"context_line":"            \u0027to save the resource. Drive: sda1\u003c/p\u003e\u003c/html\u003e\u0027)"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"    def test_507_json_response(self):"},{"line_number":1426,"context_line":"        accept_header \u003d {\u0027accept\u0027: \u0027application/json\u0027}"},{"line_number":1427,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1428,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_a8d670c1","line":1425,"in_reply_to":"3a50d1a3_6d8b9a69","updated":"2015-07-30 08:23:56.000000000","message":"I think I answered this earlier. The 507 is only error response which has a string interpolation happening for the drive name. The current way of how its done is also expected to change in the future, according to a previous comment by Pete. So I thought its best to have this at least to check for future regressions?","commit_id":"03db7f90afa7b897e14968ff9feae78abcbdd7b4"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1eb23ad91f8b1ff3299abb6b0625883464742dad","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"            \u0027\u003chtml\u003e\u003ch1\u003eInsufficient Storage\u003c/h1\u003e\u003cp\u003eThere was not enough space \u0027"},{"line_number":1423,"context_line":"            \u0027to save the resource. Drive: sda1\u003c/p\u003e\u003c/html\u003e\u0027)"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"    def test_507_json_response(self):"},{"line_number":1426,"context_line":"        accept_header \u003d {\u0027accept\u0027: \u0027application/json\u0027}"},{"line_number":1427,"context_line":"        req \u003d swift.common.swob.Request.blank(\u0027/\u0027, headers\u003daccept_header)"},{"line_number":1428,"context_line":"        resp \u003d swift.common.swob.HTTPInsufficientStorage(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_9145a344","line":1425,"in_reply_to":"3a50d1a3_a8d670c1","updated":"2015-07-31 09:57:26.000000000","message":"OK, makes sense. I would prefer a different testname, but this is just a nitpick - not a blocker for me.","commit_id":"03db7f90afa7b897e14968ff9feae78abcbdd7b4"}]}
