~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
    def test__str__(self):
132
132
        """SmartServerResponses can be stringified."""
133
133
        self.assertEqual(
134
 
            "<SmartServerResponse status=OK args=('args',) body='body'>",
 
134
            "<SuccessfulSmartServerResponse args=('args',) body='body'>",
135
135
            str(SuccessfulSmartServerResponse(('args',), 'body')))
136
136
        self.assertEqual(
137
 
            "<SmartServerResponse status=ERR args=('args',) body='body'>",
 
137
            "<FailedSmartServerResponse args=('args',) body='body'>",
138
138
            str(FailedSmartServerResponse(('args',), 'body')))
139
139
 
140
140
 
615
615
        self.assertEqual('child-1', self.tree.branch.last_revision())
616
616
 
617
617
 
 
618
class TestSmartServerBranchRequestGetStackedOnURL(tests.TestCaseWithMemoryTransport):
 
619
 
 
620
    def test_get_stacked_on_url(self):
 
621
        base_branch = self.make_branch('base', format='1.6')
 
622
        stacked_branch = self.make_branch('stacked', format='1.6')
 
623
        # typically should be relative
 
624
        stacked_branch.set_stacked_on_url('../base')
 
625
        request = smart.branch.SmartServerBranchRequestGetStackedOnURL(
 
626
            self.get_transport())
 
627
        response = request.execute('stacked')
 
628
        self.assertEquals(
 
629
            SmartServerResponse(('ok', '../base')),
 
630
            response)
 
631
 
 
632
 
618
633
class TestSmartServerBranchRequestLockWrite(tests.TestCaseWithMemoryTransport):
619
634
 
620
635
    def setUp(self):