~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev, fix hpss call count for 'bzr break-lock'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
        url = self.get_readonly_url() + '/a'
222
222
        out, err = self.run_bzr(['cat', '-d', url, 'README'])
223
223
        self.assertEqual('contents of a/README\n', out)
 
224
 
 
225
 
 
226
class TestSmartServerCat(tests.TestCaseWithTransport):
 
227
 
 
228
    def test_simple_branch_cat(self):
 
229
        self.setup_smart_server_with_call_log()
 
230
        t = self.make_branch_and_tree('branch')
 
231
        self.build_tree_contents([('branch/foo', 'thecontents')])
 
232
        t.add("foo")
 
233
        t.commit("message")
 
234
        self.reset_smart_call_log()
 
235
        out, err = self.run_bzr(['cat', "%s/foo" % self.get_url('branch')])
 
236
        # This figure represent the amount of work to perform this use case. It
 
237
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
238
        # being too low. If rpc_count increases, more network roundtrips have
 
239
        # become necessary for this use case. Please do not adjust this number
 
240
        # upwards without agreement from bzr's network support maintainers.
 
241
        self.assertLength(17, self.hpss_calls)