~bzr-pqm/bzr/bzr.dev

  • Committer: Vincent Ladeuil
  • Date: 2010-06-11 16:31:34 UTC
  • mto: (5247.4.12 sftp-leaks)
  • Revision ID: v.ladeuil+lp@free.fr-20100611163134-6z4oydq7kw401vdl
Fix a bunch of tests that were building transport objects explicitely instead of relying on self.get_transport() leading to many wrong http implementation objects being tested.

* bzrlib/tests/test_http.py:
(load_tests): Rename _qualified_prefix into _url_protocol to
ensure it's taken into account for all created http servers (and
from there that we create the right kind of transport). Relying on
_transport for that proved to be unreliable (mixed
self.transport(), self.get_transport(),
self.get_readonly_transport, etc calls) and give the wrong
transport objects to the tests.
(TestSpecificRequestHandler.create_transport_readonly_server):
Propagate url_protocol.
(TestHTTPConnections, TestWallServer, TestBadStatusServer)
(TestBadProtocolServer, TestForbiddenServer)
(TestRangeRequestServer, TestLimitedRangeRequestServer)
(TestProxyHttpServer, TestRanges, TestHTTPRedirections)
(TestHTTPSilentRedirections, TestDoCatchRedirections, TestAuth)
(TestProxyAuth, SmartHTTPTunnellingTest, TestAuthOnRedirected):
Stop using self._transport.

* bzrlib/tests/http_utils.py:
(TestCaseWithWebserver): Define and propagate url_protocol like we
did for the http protocol version.
(TestCaseWithTwoWebservers.create_transport_secondary_server):
Propagate url_protocol.
(TestCaseWithTwoWebservers.get_secondary_url)
(TestCaseWithTwoWebservers.get_secondary_transport): Add missing
helpers.
(TestCaseWithRedirectedWebserver.create_transport_secondary_server):
Propagate url_protocol.
(TestCaseWithRedirectedWebserver.get_old_url)
(TestCaseWithRedirectedWebserver.get_old_transport)
(TestCaseWithRedirectedWebserver.get_new_url)
(TestCaseWithRedirectedWebserver.get_new_transport): Add missing
helpers
Filename Latest Rev Last Changed Committer Comment Size
..
bzr-crashdb.conf 4797.33.16 14 years ago Robert Collins Update bugfix for 528114 to trunk. 174 bytes Diff Download File
README 4797.33.16 14 years ago Robert Collins Update bugfix for 528114 to trunk. 399 bytes Diff Download File
source_bzr.py 4797.33.16 14 years ago Robert Collins Update bugfix for 528114 to trunk. 1.4 KB Diff Download File