~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-25 13:18:33 UTC
  • mfrom: (6280.4.9 hpss-break-lock)
  • mto: This revision was merged to the branch mainline in revision 6318.
  • Revision ID: jelmer@samba.org-20111125131833-cn2flsn24pa0tnz7
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1039
1039
        return RemoteBranch(bzrdir, repo, _client=client, format=format)
1040
1040
 
1041
1041
 
 
1042
class TestBranchBreakLock(RemoteBranchTestCase):
 
1043
 
 
1044
    def test_break_lock(self):
 
1045
        transport_path = 'quack'
 
1046
        transport = MemoryTransport()
 
1047
        client = FakeClient(transport.base)
 
1048
        client.add_expected_call(
 
1049
            'Branch.get_stacked_on_url', ('quack/',),
 
1050
            'error', ('NotStacked',))
 
1051
        client.add_expected_call(
 
1052
            'Branch.break_lock', ('quack/',),
 
1053
            'success', ('ok',))
 
1054
        transport.mkdir('quack')
 
1055
        transport = transport.clone('quack')
 
1056
        branch = self.make_remote_branch(transport, client)
 
1057
        branch.break_lock()
 
1058
        self.assertFinished(client)
 
1059
 
 
1060
 
1042
1061
class TestBranchGetParent(RemoteBranchTestCase):
1043
1062
 
1044
1063
    def test_no_parent(self):
2205
2224
                         result)
2206
2225
 
2207
2226
 
 
2227
class TestRepositoryBreakLock(TestRemoteRepository):
 
2228
 
 
2229
    def test_break_lock(self):
 
2230
        transport_path = 'quack'
 
2231
        repo, client = self.setup_fake_client_and_repository(transport_path)
 
2232
        client.add_success_response('ok')
 
2233
        repo.break_lock()
 
2234
        self.assertEqual(
 
2235
            [('call', 'Repository.break_lock', ('quack/',))],
 
2236
            client._calls)
 
2237
 
 
2238
 
2208
2239
class TestRepositoryGetGraph(TestRemoteRepository):
2209
2240
 
2210
2241
    def test_get_graph(self):