~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Robert Collins
  • Date: 2009-07-14 00:20:03 UTC
  • mto: This revision was merged to the branch mainline in revision 4553.
  • Revision ID: robertc@robertcollins.net-20090714002003-ingqr8vlkz5577v1
Require that added ids in inventory deltas be new.

Show diffs side-by-side

added added

removed removed

Lines of Context:
440
440
        self.assertRaises(errors.InconsistentDelta, self.apply_delta, self,
441
441
            inv, delta)
442
442
 
 
443
    def test_add_existing_id_new_path(self):
 
444
        inv = self.get_empty_inventory()
 
445
        parent1 = inventory.InventoryDirectory('p-1', 'dir1', inv.root.file_id)
 
446
        parent1.revision = 'result'
 
447
        parent2 = inventory.InventoryDirectory('p-1', 'dir2', inv.root.file_id)
 
448
        parent2.revision = 'result'
 
449
        inv.add(parent1)
 
450
        delta = [(None, u'dir2', 'p-1', parent2)]
 
451
        self.assertRaises(errors.InconsistentDelta, self.apply_delta, self,
 
452
            inv, delta)
 
453
 
443
454
 
444
455
class TestInventoryEntry(TestCase):
445
456