)]}'
{"tests/test_http.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"de57eb09a5fc7397d252eef70369f19f40fa60f9","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        httplib.HTTPConnection.getresponse().AndReturn(fake)"},{"line_number":98,"context_line":"        self.mock.ReplayAll()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self.client.raw_request(\u0027GET\u0027, \u0027/v1/images/detail\u0027)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_connection_refused_raw_request(self):"},{"line_number":103,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fy18%3D","line":100,"updated":"2013-05-22 21:38:10.000000000","message":"I\u0027d like to see an assert in this test. Instead of just calling raw_request and mocking getresponse, I\u0027d mock conn.putrequest and make it call a function that asserts the url being used is what we expect.","commit_id":"0ed5df785c3c54ac35dc59da4114fec210271f7a"},{"author":{"_account_id":7387,"name":"Kevin McDonald","email":"k3vinmcdonald@gmail.com","username":"sudorandom"},"change_message_id":"320b50131690f673a10a5db59d070795c5e3b2e6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        httplib.HTTPConnection.getresponse().AndReturn(fake)"},{"line_number":98,"context_line":"        self.mock.ReplayAll()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self.client.raw_request(\u0027GET\u0027, \u0027/v1/images/detail\u0027)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_connection_refused_raw_request(self):"},{"line_number":103,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FxGI%3D","line":100,"in_reply_to":"AAAAPH%2F%2Fy18%3D","updated":"2013-05-23 15:54:22.000000000","message":"I\u0027m having a hard time wrapping my head around how to test this properly. Functionally, the test will fail if the path is passed incorrectly due to how mox works. conn.putrequest() is never directly called by the path that this test is testing, so should there be two tests covering both code paths?\n 1) going through the chunked upload code path\n 2) and one for the more simple request\n\nIt seems like these there should be two more generic tests (maybe test_raw_request and test_raw_request_chunked_upload) that contains an assertion that covers this issue with a comment referring to this issue. I don\u0027t think the chunked upload path is tested at all at the moment.\n\nOR I can move the logic that builds the URL (which is really a path...) into a \u0027private\u0027 method and just test that. For example (I hope the formatting works):\n\n    def _get_conn_url(self, url):\n        if self.endpoint_path:\n            url \u003d \u0027%s/%s\u0027 % (self.endpoint_path, url)\n        conn_url \u003d posixpath.normpath(url)\n        # Note(flaper87): Ditto, headers / url\n        # encoding to make httplib happy.\n        conn_url \u003d utils.ensure_str(conn_url)\n        return conn_url","commit_id":"0ed5df785c3c54ac35dc59da4114fec210271f7a"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"1e75dfab98a08ee6628d02db338f80e7270d6a33","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_raw_request(self):"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        Verify the path being used for HTTP requests reflects accurately."},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        def check_request(method, path, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FgV8%3D","line":89,"updated":"2013-05-31 17:13:01.000000000","message":"I think that Flavio is just asking for you to add some note in this comment like\n\n\"See https://bugs.launchpad.net/python-glanceclient/+bug/1179984 for more details\"","commit_id":"2aba1bb56a26aed0b3293d88394de6f855a050f2"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"7a660d5604c3ea39fcdbc35ac5ccdc3b84690061","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_raw_request(self):"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        Verify the path being used for HTTP requests reflects accurately."},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        def check_request(method, path, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FgQI%3D","line":89,"in_reply_to":"AAAAPH%2F%2FgV8%3D","updated":"2013-05-31 18:06:13.000000000","message":"exactly, that\u0027s what I meant.","commit_id":"2aba1bb56a26aed0b3293d88394de6f855a050f2"}]}
