~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Fix deprecations of win32utils path function unicode wrappers (Martin
 Packman)

Show diffs side-by-side

added added

removed removed

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