/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_annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2020-06-19 21:26:53 UTC
  • mfrom: (7490.40.19 work)
  • mto: This revision was merged to the branch mainline in revision 7516.
  • Revision ID: jelmer@jelmer.uk-20200619212653-7j6rgywzczhc8cmj
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    tests,
30
30
    )
31
31
 
32
 
from breezy.bzr.tests.matchers import ContainsNoVfsCalls
33
32
from breezy.urlutils import joinpath
34
33
 
35
34
from ..test_bedding import override_whoami
305
304
        wt.commit('commit', committer='test@user')
306
305
        out, err = self.run_bzr(['annotate', '-d', 'a', 'hello.txt'])
307
306
        self.assertEqualDiff('1   test@us | my helicopter\n', out)
308
 
 
309
 
 
310
 
class TestSmartServerAnnotate(tests.TestCaseWithTransport):
311
 
 
312
 
    def test_simple_annotate(self):
313
 
        self.setup_smart_server_with_call_log()
314
 
        wt = self.make_branch_and_tree('branch')
315
 
        self.build_tree_contents([('branch/hello.txt', b'my helicopter\n')])
316
 
        wt.add(['hello.txt'])
317
 
        wt.commit('commit', committer='test@user')
318
 
        self.reset_smart_call_log()
319
 
        out, err = self.run_bzr(['annotate', "-d", self.get_url('branch'),
320
 
                                 "hello.txt"])
321
 
        # This figure represent the amount of work to perform this use case. It
322
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
323
 
        # being too low. If rpc_count increases, more network roundtrips have
324
 
        # become necessary for this use case. Please do not adjust this number
325
 
        # upwards without agreement from bzr's network support maintainers.
326
 
        self.assertLength(9, self.hpss_calls)
327
 
        self.assertLength(1, self.hpss_connections)
328
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)