~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    fakenfs,
52
52
    get_transport,
53
53
    )
54
 
from bzrlib.transport.memory import MemoryServer
55
54
from bzrlib import (
56
55
    bencode,
57
56
    bzrdir,
465
464
        repo = self.make_repository('.',
466
465
                format=bzrdir.format_registry.get('knit')())
467
466
        inv_xml = '<inventory format="5">\n</inventory>\n'
468
 
        inv = repo.deserialise_inventory('test-rev-id', inv_xml)
 
467
        inv = repo._deserialise_inventory('test-rev-id', inv_xml)
469
468
        self.assertEqual('test-rev-id', inv.root.revision)
470
469
 
471
470
    def test_deserialise_uses_global_revision_id(self):
477
476
        # Arguably, the deserialise_inventory should detect a mismatch, and
478
477
        # raise an error, rather than silently using one revision_id over the
479
478
        # other.
480
 
        self.assertRaises(AssertionError, repo.deserialise_inventory,
 
479
        self.assertRaises(AssertionError, repo._deserialise_inventory,
481
480
            'test-rev-id', inv_xml)
482
 
        inv = repo.deserialise_inventory('other-rev-id', inv_xml)
 
481
        inv = repo._deserialise_inventory('other-rev-id', inv_xml)
483
482
        self.assertEqual('other-rev-id', inv.root.revision)
484
483
 
485
484
    def test_supports_external_lookups(self):