~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/stub_sftp.py

  • Committer: John Arbash Meinel
  • Date: 2005-11-20 17:00:43 UTC
  • mto: (1185.50.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1518.
  • Revision ID: john@arbash-meinel.com-20051120170043-52cdb7aefe86140e
Use a weakref dictionary to enable re-use of a connection (for sftp).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
 
27
27
class StubServer (ServerInterface):
 
28
    def __init__(self, test_case):
 
29
        ServerInterface.__init__(self)
 
30
        self._test_case = test_case
 
31
 
28
32
    def check_auth_password(self, username, password):
29
33
        # all are allowed
 
34
        self._test_case.log('sftpserver - authorizing: %s' % (username,))
30
35
        return AUTH_SUCCESSFUL
31
36
 
32
37
    def check_channel_request(self, kind, chanid):
 
38
        self._test_case.log('sftpserver - channel request: %s, %s' % (kind, chanid))
33
39
        return OPEN_SUCCEEDED
34
40
 
35
41