diff options
| author | Barry Warsaw | 2008-07-10 22:23:52 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2008-07-10 22:23:52 -0400 |
| commit | 61e99148ab4052f00951e72e19b3a750ef1e4739 (patch) | |
| tree | 06ffed62dc4ffb55ef1036f02268dee5a0aa6847 /mailman/tests/test_documentation.py | |
| parent | 408043ad8404798e9b8b93a1ee1cd81db897639c (diff) | |
| parent | 82de03b4699cb9e841f4196ff7c92e043056d3e3 (diff) | |
| download | mailman-61e99148ab4052f00951e72e19b3a750ef1e4739.tar.gz mailman-61e99148ab4052f00951e72e19b3a750ef1e4739.tar.zst mailman-61e99148ab4052f00951e72e19b3a750ef1e4739.zip | |
Diffstat (limited to 'mailman/tests/test_documentation.py')
| -rw-r--r-- | mailman/tests/test_documentation.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mailman/tests/test_documentation.py b/mailman/tests/test_documentation.py index e805b10fa..2d42f989d 100644 --- a/mailman/tests/test_documentation.py +++ b/mailman/tests/test_documentation.py @@ -29,6 +29,7 @@ import mailman from mailman.Message import Message from mailman.app.styles import style_manager from mailman.configuration import config +from mailman.testing.helpers import SMTPServer DOT = '.' @@ -54,12 +55,15 @@ def specialized_message_from_string(text): def setup(testobj): """Test setup.""" + smtpd = SMTPServer() + smtpd.start() # In general, I don't like adding convenience functions, since I think # doctests should do the imports themselves. It makes for better # documentation that way. However, a few are really useful, or help to # hide some icky test implementation details. testobj.globs['message_from_string'] = specialized_message_from_string testobj.globs['commit'] = config.db.commit + testobj.globs['smtpd'] = smtpd @@ -79,6 +83,13 @@ def cleaning_teardown(testobj): for message in config.db.message_store.messages: config.db.message_store.delete_message(message['message-id']) config.db.commit() + # Reset all archivers by disabling them. + for archiver in config.archivers.values(): + archiver.is_enabled = False + # Shutdown the smtp server. + smtpd = testobj.globs['smtpd'] + smtpd.clear() + smtpd.stop() |
