/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 breezy/tests/blackbox/test_ls.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 20:02:36 UTC
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322200236-fsbl91ktcn6fcbdd
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    ignores,
21
21
    tests,
22
22
    )
 
23
from breezy.tests.matchers import ContainsNoVfsCalls
23
24
 
24
25
 
25
26
class TestLS(tests.TestCaseWithTransport):
229
230
        self.wt.commit('commit')
230
231
        self.ls_equals('sub/\nsub/file\n', '--directory=dir')
231
232
        self.ls_equals('sub/file\n', '-d dir sub')
 
233
 
 
234
 
 
235
class TestSmartServerLs(tests.TestCaseWithTransport):
 
236
 
 
237
    def test_simple_ls(self):
 
238
        self.setup_smart_server_with_call_log()
 
239
        t = self.make_branch_and_tree('branch')
 
240
        self.build_tree_contents([('branch/foo', b'thecontents')])
 
241
        t.add("foo")
 
242
        t.commit("message")
 
243
        self.reset_smart_call_log()
 
244
        out, err = self.run_bzr(['ls', self.get_url('branch')])
 
245
        # This figure represent the amount of work to perform this use case. It
 
246
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
247
        # being too low. If rpc_count increases, more network roundtrips have
 
248
        # become necessary for this use case. Please do not adjust this number
 
249
        # upwards without agreement from bzr's network support maintainers.
 
250
        self.assertLength(6, self.hpss_calls)
 
251
        self.assertLength(1, self.hpss_connections)
 
252
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)