/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Vincent Ladeuil
  • Date: 2010-10-13 08:01:36 UTC
  • mfrom: (5447.5.1 config-read)
  • mto: This revision was merged to the branch mainline in revision 5499.
  • Revision ID: v.ladeuil+lp@free.fr-20101013080136-7o5qbbwgxhgncsj8
Merge config-read into config-modify

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from bzrlib.transport import (
32
32
    chroot,
33
33
    fakenfs,
 
34
    http,
34
35
    local,
35
36
    memory,
36
37
    pathfilter,
955
956
        ssh_server = stub_sftp.SFTPFullAbsoluteServer(StubSSHServer)
956
957
        # We *don't* want to override the default SSH vendor: the detected one
957
958
        # is the one to use.
 
959
 
 
960
        # FIXME: I don't understand the above comment, SFTPFullAbsoluteServer
 
961
        # inherits from SFTPServer which forces the SSH vendor to
 
962
        # ssh.ParamikoVendor(). So it's forced, not detected. --vila 20100623
958
963
        self.start_server(ssh_server)
959
 
        port = ssh_server._listener.port
 
964
        port = ssh_server.port
960
965
 
961
966
        if sys.platform == 'win32':
962
967
            bzr_remote_path = sys.executable + ' ' + self.get_bzr_path()
989
994
        # And the rest are threads
990
995
        for t in started[1:]:
991
996
            t.join()
 
997
 
 
998
 
 
999
class TestUnhtml(tests.TestCase):
 
1000
 
 
1001
    """Tests for unhtml_roughly"""
 
1002
 
 
1003
    def test_truncation(self):
 
1004
        fake_html = "<p>something!\n" * 1000
 
1005
        result = http.unhtml_roughly(fake_html)
 
1006
        self.assertEquals(len(result), 1000)
 
1007
        self.assertStartsWith(result, " something!")