~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_ls.py

(gz) Remove bzrlib/util/elementtree/ package (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
from bzrlib import ignores, osutils
 
21
from bzrlib import ignores
22
22
from bzrlib.tests import TestCaseWithTransport
 
23
from bzrlib.tests.matchers import ContainsNoVfsCalls
23
24
 
24
25
 
25
26
class TestLS(TestCaseWithTransport):
244
245
        self.wt.commit('commit')
245
246
        self.ls_equals('sub/\nsub/file\n', '--directory=dir')
246
247
        self.ls_equals('sub/file\n', '-d dir sub')
 
248
 
 
249
 
 
250
class TestSmartServerLs(TestCaseWithTransport):
 
251
 
 
252
    def test_simple_ls(self):
 
253
        self.setup_smart_server_with_call_log()
 
254
        t = self.make_branch_and_tree('branch')
 
255
        self.build_tree_contents([('branch/foo', 'thecontents')])
 
256
        t.add("foo")
 
257
        t.commit("message")
 
258
        self.reset_smart_call_log()
 
259
        out, err = self.run_bzr(['ls', self.get_url('branch')])
 
260
        # This figure represent the amount of work to perform this use case. It
 
261
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
262
        # being too low. If rpc_count increases, more network roundtrips have
 
263
        # become necessary for this use case. Please do not adjust this number
 
264
        # upwards without agreement from bzr's network support maintainers.
 
265
        self.assertLength(6, self.hpss_calls)
 
266
        self.assertLength(1, self.hpss_connections)
 
267
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)