~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf.py

  • Committer: Martin Pool
  • Date: 2011-06-14 02:21:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110614022141-18hmm7s0iw3utcbj
Deprecate __contains__ on Tree and Inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
        return creator, tree
331
331
 
332
332
    def check_shelve_deletion(self, tree):
333
 
        self.assertTrue('foo-id' in tree)
334
 
        self.assertTrue('bar-id' in tree)
 
333
        self.assertTrue(tree.has_id('foo-id'))
 
334
        self.assertTrue(tree.has_id('bar-id'))
335
335
        self.assertFileEqual('baz', 'tree/foo/bar')
336
336
 
337
337
    def test_shelve_deletion(self):
574
574
        creator.transform()
575
575
        creator.finalize()
576
576
        # validate the test setup
577
 
        self.assertTrue('foo-id' in tree)
578
 
        self.assertTrue('bar-id' in tree)
 
577
        self.assertTrue(tree.has_id('foo-id'))
 
578
        self.assertTrue(tree.has_id('bar-id'))
579
579
        self.assertFileEqual('baz', 'tree/foo/bar')
580
580
        shelf_file.seek(0)
581
581
        unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
582
582
        self.addCleanup(unshelver.finalize)
583
583
        unshelver.make_merger().do_merge()
584
 
        self.assertFalse('foo-id' in tree)
585
 
        self.assertFalse('bar-id' in tree)
 
584
        self.assertFalse(tree.has_id('foo-id'))
 
585
        self.assertFalse(tree.has_id('bar-id'))
586
586
 
587
587
    def test_unshelve_base(self):
588
588
        tree = self.make_branch_and_tree('tree')