~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-11-23 12:00:17 UTC
  • mfrom: (6284 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6314.
  • Revision ID: jelmer@samba.org-20111123120017-8ijg60aqqsx5cma5
Merge bzr.dev, fix hpss call counts.

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,
416
413
        zfile = zipfile.ZipFile('test.zip')
417
414
        info = zfile.getinfo("test/har")
418
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)