~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

  • Committer: Patch Queue Manager
  • Date: 2011-11-17 12:59:55 UTC
  • mfrom: (6263.2.3 hpss-make-workingtrees)
  • Revision ID: pqm@pqm.ubuntu.com-20111117125955-yjbz106l8gkzslos
(jelmer) Add HPSS call ``Repository.make_working_trees``. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1627
1627
            request.execute('', ))
1628
1628
 
1629
1629
 
 
1630
class TestSmartServerRepositoryMakeWorkingTrees(
 
1631
        tests.TestCaseWithMemoryTransport):
 
1632
 
 
1633
    def test_make_working_trees(self):
 
1634
        """For a repository with working trees, ('yes', ) is returned."""
 
1635
        backing = self.get_transport()
 
1636
        request = smart_repo.SmartServerRepositoryMakeWorkingTrees(backing)
 
1637
        r = self.make_repository('.')
 
1638
        r.set_make_working_trees(True)
 
1639
        self.assertEqual(smart_req.SmartServerResponse(('yes', )),
 
1640
            request.execute('', ))
 
1641
 
 
1642
    def test_is_not_shared(self):
 
1643
        """For a repository with working trees, ('no', ) is returned."""
 
1644
        backing = self.get_transport()
 
1645
        request = smart_repo.SmartServerRepositoryMakeWorkingTrees(backing)
 
1646
        r = self.make_repository('.')
 
1647
        r.set_make_working_trees(False)
 
1648
        self.assertEqual(smart_req.SmartServerResponse(('no', )),
 
1649
            request.execute('', ))
 
1650
 
 
1651
 
1630
1652
class TestSmartServerRepositoryLockWrite(tests.TestCaseWithMemoryTransport):
1631
1653
 
1632
1654
    def test_lock_write_on_unlocked_repo(self):
1934
1956
            smart_repo.SmartServerRepositoryIsShared)
1935
1957
        self.assertHandlerEqual('Repository.lock_write',
1936
1958
            smart_repo.SmartServerRepositoryLockWrite)
 
1959
        self.assertHandlerEqual('Repository.make_working_trees',
 
1960
            smart_repo.SmartServerRepositoryMakeWorkingTrees)
1937
1961
        self.assertHandlerEqual('Repository.tarball',
1938
1962
            smart_repo.SmartServerRepositoryTarball)
1939
1963
        self.assertHandlerEqual('Repository.unlock',