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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-19 22:18:01 UTC
  • mfrom: (7515.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200619221801-6chb6w22ctckkajl
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/386125

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    features,
36
36
    TestCaseWithTransport,
37
37
    )
38
 
from ...bzr.tests.matchers import ContainsNoVfsCalls
39
38
 
40
39
 
41
40
class TestExport(TestCaseWithTransport):
417
416
        zfile = zipfile.ZipFile('test.zip')
418
417
        info = zfile.getinfo("test/har")
419
418
        self.assertEqual(time.localtime(timestamp)[:6], info.date_time)
420
 
 
421
 
 
422
 
class TestSmartServerExport(TestCaseWithTransport):
423
 
 
424
 
    def test_simple_export(self):
425
 
        self.setup_smart_server_with_call_log()
426
 
        t = self.make_branch_and_tree('branch')
427
 
        self.build_tree_contents([('branch/foo', b'thecontents')])
428
 
        t.add("foo")
429
 
        t.commit("message")
430
 
        self.reset_smart_call_log()
431
 
        out, err = self.run_bzr(
432
 
            ['export', "foo.tar.gz", self.get_url('branch')])
433
 
        # This figure represent the amount of work to perform this use case. It
434
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
435
 
        # being too low. If rpc_count increases, more network roundtrips have
436
 
        # become necessary for this use case. Please do not adjust this number
437
 
        # upwards without agreement from bzr's network support maintainers.
438
 
        self.assertLength(8, self.hpss_calls)
439
 
        self.assertLength(1, self.hpss_connections)
440
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)