Part of bzrlib.tests.test_server View In Hierarchy
Known subclasses: bzrlib.tests.ftp_server.medusa_based.FTPTestServer, bzrlib.tests.ftp_server.pyftpdlib_based.FTPTestServer, bzrlib.tests.test_server.DecoratorServer, bzrlib.tests.test_server.LocalURLServer, bzrlib.transport.gio_transport.GioLocalURLServer
The TestServer interface provides a server for a given transport. We use these servers as loopback testing tools. For any given transport the Servers it provides must either allow writing, or serve the contents of os.getcwdu() at the time start_server is called.
Note that these are real servers - they must implement all the things that we want bzr transports to take advantage of.
Method | get_url | Return a url for this server. |
Method | get_bogus_url | Return a url for this protocol, that will fail to connect. |
Inherited from Server:
Method | start_server | Setup the server to service requests. |
Method | stop_server | Remove the server and cleanup any resources it owns. |
If the transport does not represent a disk directory (i.e. it is a database like svn, or a memory only transport, it should return a connection to a newly established resource for this Server. Otherwise it should return a url that will provide access to the path that was os.getcwdu() when start_server() was called.
Subsequent calls will return the same resource.
This may raise NotImplementedError to indicate that this server cannot provide bogus urls.