/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_commit.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 23:36:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6927.
  • Revision ID: jelmer@jelmer.uk-20180324233629-oqqturut7h8qrqyz
Remove __getitem__ and __iter__ from Inventory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
331
331
            wt.unlock()
332
332
 
333
333
        inv = b.repository.get_inventory(r4)
334
 
        eq(inv['hello-id'].revision, r4)
335
 
        eq(inv['a-id'].revision, r1)
336
 
        eq(inv['b-id'].revision, r3)
 
334
        eq(inv.get_entry('hello-id').revision, r4)
 
335
        eq(inv.get_entry('a-id').revision, r1)
 
336
        eq(inv.get_entry('b-id').revision, r3)
337
337
 
338
338
    def test_removed_commit(self):
339
339
        """Commit with a removed file"""
373
373
              ['dirid', 'file1id', 'file2id'])
374
374
        wt.commit('dir/file1', specific_files=['dir/file1'], rev_id='1')
375
375
        inv = b.repository.get_inventory('1')
376
 
        self.assertEqual('1', inv['dirid'].revision)
377
 
        self.assertEqual('1', inv['file1id'].revision)
 
376
        self.assertEqual('1', inv.get_entry('dirid').revision)
 
377
        self.assertEqual('1', inv.get_entry('file1id').revision)
378
378
        # FIXME: This should raise a KeyError I think, rbc20051006
379
 
        self.assertRaises(BzrError, inv.__getitem__, 'file2id')
 
379
        self.assertRaises(BzrError, inv.get_entry, 'file2id')
380
380
 
381
381
    def test_strict_commit(self):
382
382
        """Try and commit with unknown files and strict = True, should fail."""