~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: Martin Pool
  • Date: 2011-02-03 05:46:08 UTC
  • mto: This revision was merged to the branch mainline in revision 5643.
  • Revision ID: mbp@canonical.com-20110203054608-3r779z0kq7cewtal
Empty entries in the ``NO_PROXY`` variable are no longer treated as matching every host.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1089
1089
        self.overrideEnv('http_proxy', 'host:1234')
1090
1090
        self.assertRaises(errors.InvalidURL, self._proxied_request)
1091
1091
 
 
1092
    def test_evaluate_proxy_bypass(self):
 
1093
        """Test matching of no_proxy etc"""
 
1094
        handler = _urllib2_wrappers.ProxyHandler()
 
1095
        # https://bugs.launchpad.net/bzr/+bug/586341
 
1096
        self.assertEquals(
 
1097
            None,
 
1098
            handler.evaluate_proxy_bypass(
 
1099
                'example.com',
 
1100
                ','))
 
1101
 
1092
1102
 
1093
1103
class TestProxyHttpServer(http_utils.TestCaseWithTwoWebservers):
1094
1104
    """Tests proxy server.