-
Committer:
Vincent Ladeuil
-
Date:
2007-10-20 16:49:14 UTC
-
mto:
(2961.1.1 trunk)
-
mto:
This revision was merged to the branch mainline in
revision
2962.
-
Revision ID:
v.ladeuil+lp@free.fr-20071020164914-zr8s4gimxnbmvecd
Since all schemes query AuthenticationConfig then prompt user, make that
a method.
* bzrlib/transport/ssh.py:
(_paramiko_auth): Simplified.
* bzrlib/transport/http/_urllib2_wrappers.py:
Add FIXME about https never mentioned in prompts.
(AbstractAuthHandler.get_password): Simplified.
* bzrlib/transport/ftp.py:
(FtpTransport._create_connection): Simplified.
* bzrlib/tests/test_smtp_connection.py:
(TestSMTPConnection.test_smtp_password_from_user): Moved from
TestSMTPConnectionWithUI and given a proper stdout for ui_factory.
(TestSMTPConnectionWithUI): Deleted.
* bzrlib/tests/test_http.py:
(TestAuth.setUp): Mother class already install a SilentUIFactory
and restore the proper one, so there is no need to do that
ourselves.
(TestAuth.restoreUIFactory): Deleted.
(TestAuth.test_prompt_for_password,
TestAuth.test_no_prompt_for_password_when_using_auth_config):
Provides a suitable stdout to TestUIFactory.
* bzrlib/tests/test_ftp_transport.py:
(TestFTPServerUI.setUp, TestFTPServerUI.restoreUIFactory):
Deleted. Mother class already install a SilentUIFactory and
restore the proper one, so there is no need to do that ourselves.
(TestFTPServerUI.test_prompt_for_password,
TestFTPServerUI.test_no_prompt_for_password_when_using_auth_config):
Provides a suitable stdout to TestUIFactory.
* bzrlib/smtp_connection.py:
(SMTPConnection._authenticate): Simplified.
* bzrlib/config.py:
(AuthenticationConfig.get_password): Encapsulate pattern common to
all schemes actually used.