~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_server.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:08:38 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209170838-f11kugp9yns8lt5t
Move LocalURLServer to bzrlib.tests.test_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        raise NotImplementedError
54
54
 
55
55
 
 
56
class LocalURLServer(Server):
 
57
    """A pretend server for local transports, using file:// urls.
 
58
 
 
59
    Of course no actual server is required to access the local filesystem, so
 
60
    this just exists to tell the test code how to get to it.
 
61
    """
 
62
 
 
63
    def start_server(self):
 
64
        pass
 
65
 
 
66
    def get_url(self):
 
67
        """See Transport.Server.get_url."""
 
68
        return urlutils.local_path_to_url('')
 
69
 
 
70
 
56
71
class DecoratorServer(Server):
57
72
    """Server for the TransportDecorator for testing with.
58
73
 
70
85
            self._made_server = False
71
86
            self._server = server
72
87
        else:
73
 
            from bzrlib.transport.local import LocalURLServer
74
88
            self._made_server = True
75
89
            self._server = LocalURLServer()
76
90
            self._server.start_server()