~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-18 02:51:19 UTC
  • mfrom: (4691.2.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090918025119-eqkrmtj09t2hqs2t
(robertc) Add test suite enforcement of BzrDir objects outside the
        test area. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
689
689
        # fallback all the way to the first version.
690
690
        reference_format = self.get_repo_format()
691
691
        network_name = reference_format.network_name()
692
 
        client = FakeClient('bzr://example.com/')
 
692
        server_url = 'bzr://example.com/'
 
693
        self.permit_url(server_url)
 
694
        client = FakeClient(server_url)
693
695
        client.add_unknown_method_response('BzrDir.find_repositoryV3')
694
696
        client.add_unknown_method_response('BzrDir.find_repositoryV2')
695
697
        client.add_success_response('ok', '', 'no', 'no')
701
703
            reference_format.get_format_string(), 'ok')
702
704
        # PackRepository wants to do a stat
703
705
        client.add_success_response('stat', '0', '65535')
704
 
        remote_transport = RemoteTransport('bzr://example.com/quack/', medium=False,
 
706
        remote_transport = RemoteTransport(server_url + 'quack/', medium=False,
705
707
            _client=client)
706
708
        bzrdir = RemoteBzrDir(remote_transport, remote.RemoteBzrDirFormat(),
707
709
            _client=client)
721
723
        # fallback to find_repositoryV2
722
724
        reference_format = self.get_repo_format()
723
725
        network_name = reference_format.network_name()
724
 
        client = FakeClient('bzr://example.com/')
 
726
        server_url = 'bzr://example.com/'
 
727
        self.permit_url(server_url)
 
728
        client = FakeClient(server_url)
725
729
        client.add_unknown_method_response('BzrDir.find_repositoryV3')
726
730
        client.add_success_response('ok', '', 'no', 'no', 'no')
727
731
        # A real repository instance will be created to determine the network
732
736
            reference_format.get_format_string(), 'ok')
733
737
        # PackRepository wants to do a stat
734
738
        client.add_success_response('stat', '0', '65535')
735
 
        remote_transport = RemoteTransport('bzr://example.com/quack/', medium=False,
 
739
        remote_transport = RemoteTransport(server_url + 'quack/', medium=False,
736
740
            _client=client)
737
741
        bzrdir = RemoteBzrDir(remote_transport, remote.RemoteBzrDirFormat(),
738
742
            _client=client)