~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/ftp_server/pyftpdlib_based.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-08 03:35:09 UTC
  • mfrom: (4934.3.4 cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20100108033509-5dp440ermqsavlhr
(mbp) rename Server.setUp and tearDown to start_server and stop_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        """This is used by ftp_server to log connections, etc."""
158
158
        self.logs.append(message)
159
159
 
160
 
    def setUp(self, vfs_server=None):
 
160
    def start_server(self, vfs_server=None):
161
161
        from bzrlib.transport.local import LocalURLServer
162
162
        if not (vfs_server is None or isinstance(vfs_server, LocalURLServer)):
163
163
            raise AssertionError(
187
187
        self._ftpd_starting.acquire()
188
188
        self._ftpd_starting.release()
189
189
 
190
 
    def tearDown(self):
191
 
        """See bzrlib.transport.Server.tearDown."""
 
190
    def stop_server(self):
 
191
        """See bzrlib.transport.Server.stop_server."""
192
192
        # Tell the server to stop, but also close the server socket for tests
193
193
        # that start the server but never initiate a connection. Closing the
194
194
        # socket should be done first though, to avoid further connections.
197
197
        self._ftpd_thread.join()
198
198
 
199
199
    def _run_server(self):
200
 
        """Run the server until tearDown is called, shut it down properly then.
 
200
        """Run the server until stop_server is called, shut it down properly then.
201
201
        """
202
202
        self._ftpd_running = True
203
203
        self._ftpd_starting.release()