~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-16 19:18:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6391.
  • Revision ID: jelmer@samba.org-20111216191839-eg681lxqibi1qxu1
Fix remaining tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008, 2009, 2010 Robey Pointer <robey@lag.net>, Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008-2011 Robey Pointer <robey@lag.net>, Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
21
21
 
22
22
import os
23
23
import paramiko
24
 
import select
25
24
import socket
26
25
import SocketServer
27
26
import sys
28
 
import threading
29
27
import time
30
28
 
31
29
from bzrlib import (
120
118
    else:
121
119
        def canonicalize(self, path):
122
120
            if os.path.isabs(path):
123
 
                return os.path.normpath(path)
 
121
                return osutils.normpath(path)
124
122
            else:
125
 
                return os.path.normpath('/' + os.path.join(self.home, path))
 
123
                return osutils.normpath('/' + os.path.join(self.home, path))
126
124
 
127
125
    def chattr(self, path, attr):
128
126
        try:
555
553
 
556
554
    def get_url(self):
557
555
        """See bzrlib.transport.Server.get_url."""
558
 
        return self._get_sftp_url("~/")
 
556
        return self._get_sftp_url("%7E/")
559
557
 
560
558
 
561
559
class SFTPSiblingAbsoluteServer(SFTPAbsoluteServer):