~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-11-22 23:26:48 UTC
  • mto: This revision was merged to the branch mainline in revision 6284.
  • Revision ID: jelmer@samba.org-20111122232648-ffxhj5dspomwiyzy
Add hpss call count test for 'bzr annotate'.

Show diffs side-by-side

added added

removed removed

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