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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from cStringIO import StringIO
28
28
import zlib
29
29
 
30
 
from bzrlib import (
 
30
from breezy import (
31
31
    bencode,
32
32
    branch,
33
33
    bzrdir,
44
44
    versionedfile,
45
45
    vf_search,
46
46
    )
47
 
from bzrlib.branch import Branch
48
 
from bzrlib.bzrdir import (
 
47
from breezy.branch import Branch
 
48
from breezy.bzrdir import (
49
49
    BzrDir,
50
50
    BzrDirFormat,
51
51
    RemoteBzrProber,
52
52
    )
53
 
from bzrlib.chk_serializer import chk_bencode_serializer
54
 
from bzrlib.remote import (
 
53
from breezy.chk_serializer import chk_bencode_serializer
 
54
from breezy.remote import (
55
55
    RemoteBranch,
56
56
    RemoteBranchFormat,
57
57
    RemoteBzrDir,
59
59
    RemoteRepository,
60
60
    RemoteRepositoryFormat,
61
61
    )
62
 
from bzrlib.repofmt import groupcompress_repo, knitpack_repo
63
 
from bzrlib.revision import (
 
62
from breezy.repofmt import groupcompress_repo, knitpack_repo
 
63
from breezy.revision import (
64
64
    NULL_REVISION,
65
65
    Revision,
66
66
    )
67
 
from bzrlib.smart import medium, request
68
 
from bzrlib.smart.client import _SmartClient
69
 
from bzrlib.smart.repository import (
 
67
from breezy.smart import medium, request
 
68
from breezy.smart.client import _SmartClient
 
69
from breezy.smart.repository import (
70
70
    SmartServerRepositoryGetParentMap,
71
71
    SmartServerRepositoryGetStream_1_19,
72
72
    _stream_to_byte_stream,
73
73
    )
74
 
from bzrlib.symbol_versioning import deprecated_in
75
 
from bzrlib.tests import (
 
74
from breezy.symbol_versioning import deprecated_in
 
75
from breezy.tests import (
76
76
    test_server,
77
77
    )
78
 
from bzrlib.tests.scenarios import load_tests_apply_scenarios
79
 
from bzrlib.transport.memory import MemoryTransport
80
 
from bzrlib.transport.remote import (
 
78
from breezy.tests.scenarios import load_tests_apply_scenarios
 
79
from breezy.transport.memory import MemoryTransport
 
80
from breezy.transport.remote import (
81
81
    RemoteTransport,
82
82
    RemoteSSHTransport,
83
83
    RemoteTCPTransport,
3602
3602
 
3603
3603
 
3604
3604
class TestErrorTranslationBase(tests.TestCaseWithMemoryTransport):
3605
 
    """Base class for unit tests for bzrlib.remote._translate_error."""
 
3605
    """Base class for unit tests for breezy.remote._translate_error."""
3606
3606
 
3607
3607
    def translateTuple(self, error_tuple, **context):
3608
3608
        """Call _translate_error with an ErrorFromSmartServer built from the
3636
3636
 
3637
3637
 
3638
3638
class TestErrorTranslationSuccess(TestErrorTranslationBase):
3639
 
    """Unit tests for bzrlib.remote._translate_error.
 
3639
    """Unit tests for breezy.remote._translate_error.
3640
3640
 
3641
3641
    Given an ErrorFromSmartServer (which has an error tuple from a smart
3642
3642
    server) and some context, _translate_error raises more specific errors from
3643
 
    bzrlib.errors.
 
3643
    breezy.errors.
3644
3644
 
3645
3645
    This test case covers the cases where _translate_error succeeds in
3646
3646
    translating an ErrorFromSmartServer to something better.  See
3816
3816
 
3817
3817
 
3818
3818
class TestErrorTranslationRobustness(TestErrorTranslationBase):
3819
 
    """Unit tests for bzrlib.remote._translate_error's robustness.
 
3819
    """Unit tests for breezy.remote._translate_error's robustness.
3820
3820
 
3821
3821
    TestErrorTranslationSuccess is for cases where _translate_error can
3822
3822
    translate successfully.  This class about how _translate_err behaves when