~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-10 19:37:20 UTC
  • mfrom: (4222.3.15 username)
  • Revision ID: pqm@pqm.ubuntu.com-20090410193720-nyej7ft1k2yoyhui
(Jelmer) Prompt for user names for http if they are not in the
        configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import bz2
27
27
from cStringIO import StringIO
 
28
import getpass
28
29
 
29
30
from bzrlib import (
30
31
    bzrdir,
1472
1473
 
1473
1474
class TestRemoteSSHTransportAuthentication(tests.TestCaseInTempDir):
1474
1475
 
1475
 
    def test_defaults_to_none(self):
 
1476
    def test_defaults_to_getuser(self):
1476
1477
        t = RemoteSSHTransport('bzr+ssh://example.com')
1477
 
        self.assertIs(None, t._get_credentials()[0])
 
1478
        self.assertIs(getpass.getuser(), t._get_credentials()[0])
1478
1479
 
1479
1480
    def test_uses_authentication_config(self):
1480
1481
        conf = config.AuthenticationConfig()