~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-12 13:44:20 UTC
  • mfrom: (6358 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6362.
  • Revision ID: jelmer@samba.org-20111212134420-20130h4aa5ewp2m7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2208
2208
            request.execute('', ))
2209
2209
 
2210
2210
 
 
2211
class TestSmartServerRepositoryReconcile(tests.TestCaseWithTransport):
 
2212
 
 
2213
    def test_reconcile(self):
 
2214
        backing = self.get_transport()
 
2215
        repo = self.make_repository('.')
 
2216
        token = repo.lock_write().repository_token
 
2217
        self.addCleanup(repo.unlock)
 
2218
        request_class = smart_repo.SmartServerRepositoryReconcile
 
2219
        request = request_class(backing)
 
2220
        self.assertEqual(smart_req.SuccessfulSmartServerResponse(
 
2221
            ('ok', ),
 
2222
             'garbage_inventories: 0\n'
 
2223
             'inconsistent_parents: 0\n'),
 
2224
            request.execute('', token))
 
2225
 
 
2226
 
2211
2227
class TestSmartServerIsReadonly(tests.TestCaseWithMemoryTransport):
2212
2228
 
2213
2229
    def test_is_readonly_no(self):
2513
2529
            smart_repo.SmartServerRepositoryMakeWorkingTrees)
2514
2530
        self.assertHandlerEqual('Repository.pack',
2515
2531
            smart_repo.SmartServerRepositoryPack)
 
2532
        self.assertHandlerEqual('Repository.reconcile',
 
2533
            smart_repo.SmartServerRepositoryReconcile)
2516
2534
        self.assertHandlerEqual('Repository.tarball',
2517
2535
            smart_repo.SmartServerRepositoryTarball)
2518
2536
        self.assertHandlerEqual('Repository.unlock',