~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-20 05:12:03 UTC
  • mfrom: (4630.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090820051203-riyg1vh31w486hc6
(vila) Fix some more pycurl related karmic test failures

Show diffs side-by-side

added added

removed removed

Lines of Context:
625
625
        # for details) make no distinction between a closed
626
626
        # socket and badly formatted status line, so we can't
627
627
        # just test for ConnectionError, we have to test
628
 
        # InvalidHttpResponse too.
629
 
        self.assertRaises((errors.ConnectionError, errors.InvalidHttpResponse),
 
628
        # InvalidHttpResponse too. And pycurl may raise ConnectionReset
 
629
        # instead of ConnectionError too.
 
630
        self.assertRaises(( errors.ConnectionError, errors.ConnectionReset,
 
631
                            errors.InvalidHttpResponse),
630
632
                          t.has, 'foo/bar')
631
633
 
632
634
    def test_http_get(self):
633
635
        server = self.get_readonly_server()
634
636
        t = self._transport(server.get_url())
635
 
        self.assertRaises((errors.ConnectionError, errors.InvalidHttpResponse),
 
637
        self.assertRaises((errors.ConnectionError, errors.ConnectionReset,
 
638
                           errors.InvalidHttpResponse),
636
639
                          t.get, 'foo/bar')
637
640
 
638
641