~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Aaron Bentley
  • Date: 2008-11-18 21:43:36 UTC
  • mto: This revision was merged to the branch mainline in revision 3840.
  • Revision ID: aaron@aaronbentley.com-20081118214336-53wku2p6og6kvl5r
Updates from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
1750
1750
        finally:
1751
1751
            remote_repo.unlock()
1752
1752
 
1753
 
    def test_stacked_get_parent_map(self):
 
1753
    def prepare_stacked_remote_branch(self):
1754
1754
        smart_server = server.SmartTCPServer_for_testing()
1755
1755
        smart_server.setUp()
1756
1756
        self.addCleanup(smart_server.tearDown)
1761
1761
        branch2 = Branch.open(smart_server.get_url() + '/tree2')
1762
1762
        branch2.lock_read()
1763
1763
        self.addCleanup(branch2.unlock)
1764
 
        repo = branch2.repository
 
1764
        return branch2
 
1765
 
 
1766
    def test_stacked_get_parent_map(self):
 
1767
        # the public implementation of get_parent_map obeys stacking
 
1768
        branch = self.prepare_stacked_remote_branch()
 
1769
        repo = branch.repository
1765
1770
        self.assertEqual(['rev1'], repo.get_parent_map(['rev1']).keys())
 
1771
 
 
1772
    def test_stacked__get_parent_map(self):
 
1773
        # the private variant of _get_parent_map ignores stacking
 
1774
        branch = self.prepare_stacked_remote_branch()
 
1775
        repo = branch.repository
 
1776
        self.assertEqual([], repo._get_parent_map(['rev1']).keys())