~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Robert Collins
  • Date: 2008-03-27 00:27:41 UTC
  • mto: This revision was merged to the branch mainline in revision 3313.
  • Revision ID: robertc@robertcollins.net-20080327002741-1vrg4yekrlvv4lfn
Fix up deprecation warnings for get_revision_graph.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
from bzrlib.revision import NULL_REVISION
46
46
from bzrlib.smart import server, medium
47
47
from bzrlib.smart.client import _SmartClient
 
48
from bzrlib.symbol_versioning import one_four
48
49
from bzrlib.transport.memory import MemoryTransport
49
50
from bzrlib.transport.remote import RemoteTransport
50
51
 
705
706
        transport_path = 'empty'
706
707
        repo, client = self.setup_fake_client_and_repository(
707
708
            responses, transport_path)
708
 
        result = repo.get_revision_graph(NULL_REVISION)
 
709
        result = self.applyDeprecated(one_four, repo.get_revision_graph,
 
710
            NULL_REVISION)
709
711
        self.assertEqual([], client._calls)
710
712
        self.assertEqual({}, result)
711
713
 
720
722
        transport_path = 'sinhala'
721
723
        repo, client = self.setup_fake_client_and_repository(
722
724
            responses, transport_path)
723
 
        result = repo.get_revision_graph()
 
725
        result = self.applyDeprecated(one_four, repo.get_revision_graph)
724
726
        self.assertEqual(
725
727
            [('call_expecting_body', 'Repository.get_revision_graph',
726
728
             ('sinhala/', ''))],
740
742
        transport_path = 'sinhala'
741
743
        repo, client = self.setup_fake_client_and_repository(
742
744
            responses, transport_path)
743
 
        result = repo.get_revision_graph(r2)
 
745
        result = self.applyDeprecated(one_four, repo.get_revision_graph, r2)
744
746
        self.assertEqual(
745
747
            [('call_expecting_body', 'Repository.get_revision_graph',
746
748
             ('sinhala/', r2))],
755
757
            responses, transport_path)
756
758
        # also check that the right revision is reported in the error
757
759
        self.assertRaises(errors.NoSuchRevision,
758
 
            repo.get_revision_graph, revid)
 
760
            self.applyDeprecated, one_four, repo.get_revision_graph, revid)
759
761
        self.assertEqual(
760
762
            [('call_expecting_body', 'Repository.get_revision_graph',
761
763
             ('sinhala/', revid))],