/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

Get first deployment

Show diffs side-by-side

added added

removed removed

Lines of Context:
452
452
        # Import the module locally now that we now it's available.
453
453
        pycurl = features.pycurl.module
454
454
 
455
 
        version_info_orig = pycurl.version_info
456
 
        def restore():
457
 
            pycurl.version_info = version_info_orig
458
 
        self.addCleanup(restore)
459
 
 
 
455
        self.addAttrCleanup(pycurl, 'version_info')
460
456
        # Fake the pycurl version_info This was taken from a windows pycurl
461
457
        # without SSL (thanks to bialix)
462
458
        pycurl.version_info = lambda : (2,
1364
1360
 
1365
1361
 
1366
1362
def install_redirected_request(test):
1367
 
    test.original_class = _urllib2_wrappers.Request
1368
 
    def restore():
1369
 
        _urllib2_wrappers.Request = test.original_class
 
1363
    test.addAttrCleanup(_urllib2_wrappers, 'Request')
1370
1364
    _urllib2_wrappers.Request = RedirectedRequest
1371
 
    test.addCleanup(restore)
1372
1365
 
1373
1366
 
1374
1367
class TestHTTPSilentRedirections(http_utils.TestCaseWithRedirectedWebserver):