~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Aaron Bentley
  • Date: 2006-10-29 18:30:57 UTC
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20061029183057-af9d71b62956a668
Start roundtripping tree-reference entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.branch import Branch
23
23
from bzrlib.diff import internal_diff
24
24
from bzrlib.inventory import (Inventory, ROOT_ID, InventoryFile,
25
 
    InventoryDirectory, InventoryEntry)
 
25
    InventoryDirectory, InventoryEntry, TreeReference)
26
26
from bzrlib.osutils import (has_symlinks, rename, pathjoin, is_inside_any, 
27
27
    is_inside_or_parent_of_any)
28
28
from bzrlib.tests import TestCase, TestCaseWithTransport
570
570
        inv.root = None
571
571
        self.assertFalse(inv.is_root('TREE_ROOT'))
572
572
        self.assertFalse(inv.is_root('booga'))
 
573
 
 
574
 
 
575
class TestTreeReference(TestCase):
 
576
    
 
577
    def test_create(self):
 
578
        inv = Inventory('tree-root-123')
 
579
        inv.add(TreeReference('nested-id', 'nested', parent_id='tree-root-123',
 
580
                              revision='rev', reference_revision='rev2'))