/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 bzrlib/tests/blackbox/test_export.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-25 17:54:52 UTC
  • mfrom: (6303 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6321.
  • Revision ID: jelmer@samba.org-20111125175452-v0uwwxqcp97tzuzv
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from StringIO import StringIO
22
22
import os
23
23
import stat
24
 
import sys
25
24
import tarfile
26
25
import time
27
26
import zipfile
29
28
 
30
29
from bzrlib import (
31
30
    export,
32
 
    osutils,
33
 
    tests,
34
31
    )
35
32
from bzrlib.tests import (
36
33
    features,
194
191
    def test_tbz2_export(self):
195
192
        self.run_tar_export_disk_and_stdout('tbz2', 'bz2')
196
193
 
197
 
    # TODO: test_xz_export, I don't have pylzma working here to test it.
198
 
 
199
194
    def test_zip_export_unicode(self):
200
195
        self.requireFeature(features.UnicodeFilenameFeature)
201
196
        tree = self.make_branch_and_tree('zip')
418
413
        zfile = zipfile.ZipFile('test.zip')
419
414
        info = zfile.getinfo("test/har")
420
415
        self.assertEquals(time.localtime(timestamp)[:6], info.date_time)
 
416
 
 
417
 
 
418
class TestSmartServerExport(TestCaseWithTransport):
 
419
 
 
420
    def test_simple_export(self):
 
421
        self.setup_smart_server_with_call_log()
 
422
        t = self.make_branch_and_tree('branch')
 
423
        self.build_tree_contents([('branch/foo', 'thecontents')])
 
424
        t.add("foo")
 
425
        t.commit("message")
 
426
        self.reset_smart_call_log()
 
427
        out, err = self.run_bzr(['export', "foo.tar.gz", self.get_url('branch')])
 
428
        # This figure represent the amount of work to perform this use case. It
 
429
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
430
        # being too low. If rpc_count increases, more network roundtrips have
 
431
        # become necessary for this use case. Please do not adjust this number
 
432
        # upwards without agreement from bzr's network support maintainers.
 
433
        self.assertLength(17, self.hpss_calls)