~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
213
213
class FTPTestServer(transport.Server):
214
214
    """Common code for FTP server facilities."""
215
215
 
 
216
    no_unicode_support = True
 
217
 
216
218
    def __init__(self):
217
219
        self._root = None
218
220
        self._ftp_server = None
233
235
        """This is used by medusa.ftp_server to log connections, etc."""
234
236
        self.logs.append(message)
235
237
 
236
 
    def setUp(self, vfs_server=None):
 
238
    def start_server(self, vfs_server=None):
237
239
        from bzrlib.transport.local import LocalURLServer
238
240
        if not (vfs_server is None or isinstance(vfs_server, LocalURLServer)):
239
241
            raise AssertionError(
255
257
        self._async_thread.setDaemon(True)
256
258
        self._async_thread.start()
257
259
 
258
 
    def tearDown(self):
259
 
        """See bzrlib.transport.Server.tearDown."""
 
260
    def stop_server(self):
260
261
        self._ftp_server.close()
261
262
        asyncore.close_all()
262
263
        self._async_thread.join()