~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

Fix pycurl proxy tests for newer and stricter pycurl versions. [r=jelmer]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1283
1283
            self.no_proxy_host = self.server_host_port
1284
1284
        # The secondary server is the proxy
1285
1285
        self.proxy_url = self.get_secondary_url()
 
1286
        if self._testing_pycurl():
 
1287
            self.proxy_url = self.proxy_url.replace('+pycurl', '')
1286
1288
 
1287
1289
    def _testing_pycurl(self):
1288
1290
        # TODO: This is duplicated for lots of the classes in this file
1863
1865
                                  ])
1864
1866
 
1865
1867
    def get_user_transport(self, user, password):
1866
 
        self.overrideEnv('all_proxy', self.get_user_url(user, password))
 
1868
        proxy_url = self.get_user_url(user, password)
 
1869
        if self._testing_pycurl():
 
1870
            proxy_url = proxy_url.replace('+pycurl', '')
 
1871
        self.overrideEnv('all_proxy', proxy_url)
1867
1872
        return TestAuth.get_user_transport(self, user, password)
1868
1873
 
1869
1874
    def test_empty_pass(self):