~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-28 19:12:10 UTC
  • mfrom: (5967.7.4 rm-magic-methods)
  • Revision ID: pqm@pqm.ubuntu.com-20110628191210-bwblsxn26kyu3swl
(mbp) remove __contains__ methods from inventory and dict (Martin Pool)

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):
573
573
            creator.transform()
574
574
            creator.finalize()
575
575
        # validate the test setup
576
 
        self.assertTrue('foo-id' in tree)
577
 
        self.assertTrue('bar-id' in tree)
 
576
        self.assertTrue(tree.has_id('foo-id'))
 
577
        self.assertTrue(tree.has_id('bar-id'))
578
578
        self.assertFileEqual('baz', 'tree/foo/bar')
579
579
        with open('shelf', 'r+b') as shelf_file:
580
580
            unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
581
581
            self.addCleanup(unshelver.finalize)
582
582
            unshelver.make_merger().do_merge()
583
 
        self.assertFalse('foo-id' in tree)
584
 
        self.assertFalse('bar-id' in tree)
 
583
        self.assertFalse(tree.has_id('foo-id'))
 
584
        self.assertFalse(tree.has_id('bar-id'))
585
585
 
586
586
    def test_unshelve_base(self):
587
587
        tree = self.make_branch_and_tree('tree')