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

  • Committer: Jelmer Vernooij
  • Date: 2019-03-05 07:32:38 UTC
  • mto: (7290.1.21 work)
  • mto: This revision was merged to the branch mainline in revision 7311.
  • Revision ID: jelmer@jelmer.uk-20190305073238-zlqn981opwnqsmzi
Add appveyor configuration.

Show diffs side-by-side

added added

removed removed

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