summaryrefslogtreecommitdiff
path: root/mailman/tests/helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* mailman.tests should contain only tests.Barry Warsaw2008-07-031-237/+0
| | | | mailman.testing should contain any support for running the tests.
* Added a test of the OutgoingRunner, and subsequent changes to make it pass,Barry Warsaw2008-03-271-4/+13
| | | | | | | | | | | | | | including: - MailingList.full_path -> IMailingList.data_path and implement this as a property on the MailingList object. - Fix the 'decorate' handler to work with the new member/user data model, instead of the old MemberAdaptor interface. - Fix a few problems with the smtp-direct handler, though this needs more work and tests. - Add some debug logging to both the test smtplistener and the SMTPServer proxy. Fix the proxy's consumption of messages from the thread queue. - Fix the smtplistener's calculation of the X-Peer header.
* Don't timeout in TestableMaster.start(). Just wait until all queue runnersBarry Warsaw2008-03-211-2/+2
| | | | have been started, no matter what.
* Add a working (though not yet complete) test for the LMTP runner.Barry Warsaw2008-03-121-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the TestableMaster class so that doctests don't need to do all the threading and event fiddling themselves. Hide all that in the test class. In bin/master, add the -r/--runner option to allow overriding the set of queue runners to start from the command line. This is much more convenient than fiddling the config file (which is still supported), and it allows us to start a subset of the runners from the TestableMaster class. Refactor the calculation of queue runner shortcut names into Configuration.add_qrunner(). This way, it's easy to share between bin/qrunner and bin/master. Use pkg_resource in bin/testall to create the test configuration file. We're still using mailman.__file__ as the target to os.walk() though, so this conversion isn't complete. In bin/testall, update to the new convention of putting .options and .arguments on the parser instance, so we only need to pass back one thing. In test_documentation.py, use config.verbosity instead of config.options.verbosity. Wind that through to bin/testall while we're at it. Update loginit.py so that defaults for all the logging options can be found in a [*] section. This is better than [DEFAULT] because the latter requires %-interpolation and still requires each sublogger to be specified explicitly. Now we just set values in the [*] section and have them apply to all loggers. Allow for passing bin/testall's -v and -e options to any subprocesses that get created, e.g. via the TestableMaster. Now testall will write a logging.cfg file with a [*] entry as appropriate. It's DEFAULT_DATABASE_URL now, not SQLALCHEMY_ENGINE_URL. StockDatabase._reset() requires that the store be rolled back before it's reset. Otherwise if there are outstanding transactions, the reset will fail with an OperationalError. Update the LMTPRunner. Have it return a 501 error if the message has defects. Most defective messages are spam. Make the LMTPRunner startable and stoppable. Just because it's asyncore based doesn't mean that's not possible <wink>. Enable the LMTP runner in tests.
* Fix a typo in a roster name.Barry Warsaw2008-03-061-4/+51
| | | | | | | | | | Remove an outdated comment. Add an SMTPServer wrapper class to the test helpers module. This will be used in tests of the outgoing queue, which actually needs to talk to an SMTP server. Adapt the smtpd-based server to being run under thread control, and remove some now unnecessary code.
* Bite the bullet: rename the Mailman package to mailman.Barry Warsaw2008-02-271-0/+134