/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-01 21:57:00 UTC
  • mfrom: (7490.39.3 move-launchpad)
  • Revision ID: breezy.the.bot@gmail.com-20200601215700-joxuzo6w172gq74v
Move launchpad hoster support to the launchpad plugin.

Merged from https://code.launchpad.net/~jelmer/brz/move-launchpad/+merge/384931

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    tests,
30
30
    )
31
31
 
 
32
from breezy.tests.matchers import ContainsNoVfsCalls
32
33
from breezy.urlutils import joinpath
33
34
 
34
35
from ..test_bedding import override_whoami
304
305
        wt.commit('commit', committer='test@user')
305
306
        out, err = self.run_bzr(['annotate', '-d', 'a', 'hello.txt'])
306
307
        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)