~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-08 11:34:17 UTC
  • mto: This revision was merged to the branch mainline in revision 5844.
  • Revision ID: jelmer@samba.org-20110508113417-yncmzfuj8f5cklxj
Fix test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
        # classes do not barf inappropriately when a surprising repository type
380
380
        # is handed to them.
381
381
        dummy_a = DummyRepository()
 
382
        dummy_a._format = RepositoryFormat()
 
383
        dummy_a._format.supports_full_versioned_files = True
382
384
        dummy_b = DummyRepository()
 
385
        dummy_b._format = RepositoryFormat()
 
386
        dummy_b._format.supports_full_versioned_files = True
383
387
        self.assertGetsDefaultInterRepository(dummy_a, dummy_b)
384
388
 
385
389
    def assertGetsDefaultInterRepository(self, repo_a, repo_b):
389
393
        no actual sane default in the presence of incompatible data models.
390
394
        """
391
395
        inter_repo = repository.InterRepository.get(repo_a, repo_b)
392
 
        self.assertEqual(repository.InterSameDataRepository,
 
396
        self.assertEqual(vf_repository.InterSameDataRepository,
393
397
                         inter_repo.__class__)
394
398
        self.assertEqual(repo_a, inter_repo.source)
395
399
        self.assertEqual(repo_b, inter_repo.target)
409
413
        dummy_a._serializer = repo._serializer
410
414
        dummy_a._format.supports_tree_reference = repo._format.supports_tree_reference
411
415
        dummy_a._format.rich_root_data = repo._format.rich_root_data
 
416
        dummy_a._format.supports_full_versioned_files = repo._format.supports_full_versioned_files
412
417
        dummy_b._serializer = repo._serializer
413
418
        dummy_b._format.supports_tree_reference = repo._format.supports_tree_reference
414
419
        dummy_b._format.rich_root_data = repo._format.rich_root_data
 
420
        dummy_b._format.supports_full_versioned_files = repo._format.supports_full_versioned_files
415
421
        repository.InterRepository.register_optimiser(InterDummy)
416
422
        try:
417
423
            # we should get the default for something InterDummy returns False