~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/commands/test_cat.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-29 14:21:55 UTC
  • mfrom: (3042.1.2 send-optional-address)
  • Revision ID: pqm@pqm.ubuntu.com-20071129142155-4yb05lbhm0eiyczd
Mailto address now optional for send with interactive clients (Lalinsky)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from bzrlib.builtins import cmd_cat
20
20
from bzrlib.tests import StringIOWrapper
21
 
from bzrlib.tests.TransportUtil import TestCaseWithConnectionHookedTransport
 
21
from bzrlib.tests.transport_util import TestCaseWithConnectionHookedTransport
 
22
 
22
23
 
23
24
class TestCat(TestCaseWithConnectionHookedTransport):
24
25
 
35
36
        self.addCleanup(restore_stdout)
36
37
 
37
38
    def test_cat(self):
 
39
        # FIXME: sftp raises ReadError instead of NoSuchFile when probing for
 
40
        # branch/foo/.bzr/branch-format when used with the paramiko test
 
41
        # server.
 
42
        from bzrlib.tests import TestSkipped
 
43
        raise TestSkipped('SFTPTransport raises incorrect exception'
 
44
                          ' when reading from paramiko server')
38
45
        wt1 = self.make_branch_and_tree('branch')
39
 
        file('branch/foo', 'wb').write('foo')
 
46
        self.build_tree_contents([('branch/foo', 'foo')])
40
47
        wt1.add('foo')
41
48
        wt1.commit('add foo')
42
49
 
43
 
        self.install_hooks()
44
 
        self.addCleanup(self.reset_hooks)
 
50
        self.start_logging_connections()
45
51
 
46
52
        cmd = cmd_cat()
47
 
        cmd.run(self.get_url() + 'branch/foo')
 
53
        cmd.run(self.get_url('branch/foo'))
48
54
        self.assertEquals(1, len(self.connections))
49
55
        self.assertEquals('foo', self.outf.getvalue())
50
56