~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-12-12 10:26:53 UTC
  • mfrom: (6355 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6404.
  • Revision ID: jelmer@samba.org-20111212102653-tpymqjoodukcgb2v
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2373
2373
            client._calls)
2374
2374
 
2375
2375
 
 
2376
class TestRepositoryReconcile(TestRemoteRepository):
 
2377
 
 
2378
    def test_reconcile(self):
 
2379
        transport_path = 'hill'
 
2380
        repo, client = self.setup_fake_client_and_repository(transport_path)
 
2381
        body = ("garbage_inventories: 2\n"
 
2382
                "inconsistent_parents: 3\n")
 
2383
        client.add_expected_call(
 
2384
            'Repository.lock_write', ('hill/', ''),
 
2385
            'success', ('ok', 'a token'))
 
2386
        client.add_success_response_with_body(body, 'ok')
 
2387
        reconciler = repo.reconcile()
 
2388
        self.assertEqual(
 
2389
            [('call', 'Repository.lock_write', ('hill/', '')),
 
2390
             ('call_expecting_body', 'Repository.reconcile',
 
2391
                ('hill/', 'a token'))],
 
2392
            client._calls)
 
2393
        self.assertEquals(2, reconciler.garbage_inventories)
 
2394
        self.assertEquals(3, reconciler.inconsistent_parents)
 
2395
 
 
2396
 
2376
2397
class TestRepositoryGetRevisionSignatureText(TestRemoteRepository):
2377
2398
 
2378
2399
    def test_text(self):