diff options
| author | Barry Warsaw | 2008-07-06 10:27:05 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2008-07-06 10:27:05 -0400 |
| commit | 3929c688da2b275a1bb965152cca8a7352557ffc (patch) | |
| tree | ef32ee1e5ac61570f3059ae838b30049b7055936 /mailman/tests/test_documentation.py | |
| parent | 08400a46afb740a0e49058707969462fa7e7dddf (diff) | |
| download | mailman-3929c688da2b275a1bb965152cca8a7352557ffc.tar.gz mailman-3929c688da2b275a1bb965152cca8a7352557ffc.tar.zst mailman-3929c688da2b275a1bb965152cca8a7352557ffc.zip | |
Diffstat (limited to 'mailman/tests/test_documentation.py')
| -rw-r--r-- | mailman/tests/test_documentation.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mailman/tests/test_documentation.py b/mailman/tests/test_documentation.py index 48c2c491c..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 @@ -82,6 +86,10 @@ def cleaning_teardown(testobj): # 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() |
