)]}'
{"marconi/tests/functional/http.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"6d7675d521d2f2f6443497331639d10a3b9bb7f0","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __init__(self):"},{"line_number":25,"context_line":"        self.base_url \u003d None"},{"line_number":26,"context_line":"        self.session \u003d requests.session()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def set_base_url(self, base_url):"},{"line_number":29,"context_line":"        self.base_url \u003d base_url"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FLl4%3D","line":26,"updated":"2013-09-10 14:28:17.000000000","message":"Why not pass in the base URL at initialization time? It seems reasonable that a particular test suite would target only one base URL at a time.","commit_id":"30efa2925154e8c8ae350b65e2b9c5b461d776c2"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"6d7675d521d2f2f6443497331639d10a3b9bb7f0","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                url \u003d self.base_url + url or \u0027\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"            return method(self, url, **kwargs)"},{"line_number":45,"context_line":"        return wrapper"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @_build_url"},{"line_number":48,"context_line":"    def get(self, url\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FLkY%3D","line":45,"updated":"2013-09-10 14:28:17.000000000","message":"I\u0027d like to see set_headers and set_base_url removed. If the base URL is set at test setUp time, then set_base_url isn\u0027t needed.\n\nre: set_headers, it seems that one could pass in a dictionary of headers to requests.session through kwargs.\n\nFor the case where certain headers that would be automatically set by requests should be omitted, I\u0027ve used a purge function.\n\nLet me know what you think of this approach to header-handling: https://github.com/cabrera/marconi/blob/fix_system_tests/marconi/tests/system/common/http.py (outdated branch full of test ideas)","commit_id":"30efa2925154e8c8ae350b65e2b9c5b461d776c2"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d454a461cd8adce82d69a96e8fe29fff80bde18b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                url \u003d self.base_url + url or \u0027\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"            return method(self, url, **kwargs)"},{"line_number":45,"context_line":"        return wrapper"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @_build_url"},{"line_number":48,"context_line":"    def get(self, url\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FLfs%3D","line":45,"in_reply_to":"AAAASn%2F%2FLhQ%3D","updated":"2013-09-10 14:47:27.000000000","message":"Ahh, alright. This makes sense given that the client is always instantiated in Base.setUp at the moment. That gives me the context I was missing.\n\nRegarding, sessions and headers, I\u0027m able to do:\n\ns \u003d requests.Session(); s.get(\u0027https://google.com\u0027, headers\u003d{\u0027taco\u0027: \u0027bell\u0027})\n\n...and all seems well. :)","commit_id":"30efa2925154e8c8ae350b65e2b9c5b461d776c2"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f42984be6e1f211331cc3d3f04a7b959b0234375","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                url \u003d self.base_url + url or \u0027\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"            return method(self, url, **kwargs)"},{"line_number":45,"context_line":"        return wrapper"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @_build_url"},{"line_number":48,"context_line":"    def get(self, url\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FLhQ%3D","line":45,"in_reply_to":"AAAASn%2F%2FLkY%3D","updated":"2013-09-10 14:41:37.000000000","message":"I\u0027ll reply both comments here.\n\nI first thought about passing the url to the constructor but since the client is instantiated in the Base.setUp method, it doesn\u0027t know what the base_url for that TestCase will be. So, I thought that having a method for that would make more sense. Same thing applies for the headers. \n\nAFAIK, it\u0027s only possible to update session\u0027s headers but not passing them. I looked for it but couldn\u0027t find it.\n\nI think we can implement the purge method later on, for that, I think we won\u0027t be able to use the session and will have to use request\u0027s api directly.","commit_id":"30efa2925154e8c8ae350b65e2b9c5b461d776c2"}]}
