/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/test_smart_request.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Tests for smart server request infrastructure (bzrlib.smart.request)."""
 
17
"""Tests for smart server request infrastructure (breezy.smart.request)."""
18
18
 
19
19
import threading
20
20
 
21
 
from bzrlib import (
 
21
from breezy import (
22
22
    errors,
23
23
    transport,
24
24
    )
25
 
from bzrlib.bzrdir import BzrDir
26
 
from bzrlib.smart import request
27
 
from bzrlib.tests import TestCase, TestCaseWithMemoryTransport
 
25
from breezy.bzrdir import BzrDir
 
26
from breezy.smart import request
 
27
from breezy.tests import TestCase, TestCaseWithMemoryTransport
28
28
 
29
29
 
30
30
class NoBodyRequest(request.SmartServerRequest):
176
176
 
177
177
 
178
178
class TestRequestHanderErrorTranslation(TestCase):
179
 
    """Tests for bzrlib.smart.request._translate_error."""
 
179
    """Tests for breezy.smart.request._translate_error."""
180
180
 
181
181
    def assertTranslationEqual(self, expected_tuple, error):
182
182
        self.assertEqual(expected_tuple, request._translate_error(error))
256
256
        """Opening a bzrdir in a non-main thread should work ok.
257
257
        
258
258
        This makes sure that the globally-installed
259
 
        bzrlib.smart.request._pre_open_hook, which uses a threading.local(),
 
259
        breezy.smart.request._pre_open_hook, which uses a threading.local(),
260
260
        works in a newly created thread.
261
261
        """
262
262
        bzrdir = self.make_bzrdir('.')