~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4795.4.5.

  • Committer: Vincent Ladeuil
  • Date: 2009-12-03 17:11:57 UTC
  • mto: (4862.2.2 integration2)
  • mto: This revision was merged to the branch mainline in revision 4866.
  • Revision ID: v.ladeuil+lp@free.fr-20091203171157-2lo1a9ej0fx3743b
Make sure all redirection code paths can handle authentication.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.auth_required): Provide the necessary
attributes if the caller didn't.

* bzrlib/tests/test_http.py:
(install_redirected_request): Factor out the helper.
(TestHTTPSilentRedirections.setUp): Use the above helper.
(TestHTTPSilentRedirections.test_one_redirection,
TestHTTPSilentRedirections.test_five_redirections): Delete the
useless (hence misleading) code.
(TestAuth.test_no_prompt_for_password_when_using_auth_config):
Drive-by fix prompt go to stderr, stdout is not needed here.
(TestAuthOnRedirected): Ensure we handle authentication on both
code paths.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: