~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Andrew Bennetts
  • Date: 2009-11-11 06:50:40 UTC
  • mto: This revision was merged to the branch mainline in revision 4793.
  • Revision ID: andrew.bennetts@canonical.com-20091111065040-ibq6r3cnza7ekyzs
Show real branch/repo format description in 'info -v' over HPSS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from cStringIO import StringIO
28
28
 
29
29
from bzrlib import (
 
30
    branch,
30
31
    bzrdir,
31
32
    config,
32
33
    errors,
36
37
    pack,
37
38
    remote,
38
39
    repository,
39
 
    smart,
40
40
    tests,
41
41
    treebuilder,
42
42
    urlutils,
61
61
    condition_isinstance,
62
62
    split_suite_by_condition,
63
63
    multiply_tests,
64
 
    KnownFailure,
65
64
    )
66
 
from bzrlib.transport import get_transport, http
 
65
from bzrlib.transport import get_transport
67
66
from bzrlib.transport.memory import MemoryTransport
68
67
from bzrlib.transport.remote import (
69
68
    RemoteTransport,
1782
1781
        return repo, client
1783
1782
 
1784
1783
 
 
1784
def remoted_description(format):
 
1785
    return 'Remote: ' + format.get_format_description()
 
1786
 
 
1787
 
 
1788
class TestBranchFormat(tests.TestCase):
 
1789
 
 
1790
    def test_get_format_description(self):
 
1791
        remote_format = RemoteBranchFormat()
 
1792
        real_format = branch.BranchFormat.get_default_format()
 
1793
        remote_format._network_name = real_format.network_name()
 
1794
        self.assertEqual(remoted_description(real_format),
 
1795
            remote_format.get_format_description())
 
1796
 
 
1797
 
1785
1798
class TestRepositoryFormat(TestRemoteRepository):
1786
1799
 
1787
1800
    def test_fast_delta(self):
1794
1807
        false_format._network_name = false_name
1795
1808
        self.assertEqual(False, false_format.fast_deltas)
1796
1809
 
 
1810
    def test_get_format_description(self):
 
1811
        remote_repo_format = RemoteRepositoryFormat()
 
1812
        real_format = repository.RepositoryFormat.get_default_format()
 
1813
        remote_repo_format._network_name = real_format.network_name()
 
1814
        self.assertEqual(remoted_description(real_format),
 
1815
            remote_repo_format.get_format_description())
 
1816
 
1797
1817
 
1798
1818
class TestRepositoryGatherStats(TestRemoteRepository):
1799
1819