diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-11-13 20:23:26 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-11-13 20:23:26 -0600 |
commit | ee91c2b88d1a42b9d15d34d2c081cd8394649041 (patch) | |
tree | 01a75b958b2814763a0b219145bbe284d1d04931 /mediagoblin/tools/mail.py | |
parent | 4671fda345394dad9ca4278b1cf7b2cdf7d2b4ee (diff) | |
parent | 285ffeddf3542201b83072d3be544c85e9c487c2 (diff) | |
download | mediagoblin-ee91c2b88d1a42b9d15d34d2c081cd8394649041.tar.lz mediagoblin-ee91c2b88d1a42b9d15d34d2c081cd8394649041.tar.xz mediagoblin-ee91c2b88d1a42b9d15d34d2c081cd8394649041.zip |
Merge remote-tracking branch 'remotes/nyergler/pep8-ification'
Conflicts:
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/user_pages/views.py
mediagoblin/util.py
Diffstat (limited to 'mediagoblin/tools/mail.py')
-rw-r--r-- | mediagoblin/tools/mail.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mediagoblin/tools/mail.py b/mediagoblin/tools/mail.py index 826acdbf..9e00be7d 100644 --- a/mediagoblin/tools/mail.py +++ b/mediagoblin/tools/mail.py @@ -24,7 +24,7 @@ from mediagoblin.tools import common ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # We have two "test inboxes" here: -# +# # EMAIL_TEST_INBOX: # ---------------- # If you're writing test views, you'll probably want to check this. @@ -44,11 +44,12 @@ from mediagoblin.tools import common # ***IMPORTANT!*** # ---------------- # Before running tests that call functions which send email, you should -# always call _clear_test_inboxes() to "wipe" the inboxes clean. +# always call _clear_test_inboxes() to "wipe" the inboxes clean. EMAIL_TEST_INBOX = [] EMAIL_TEST_MBOX_INBOX = [] + class FakeMhost(object): """ Just a fake mail host so we can capture and test messages @@ -63,12 +64,14 @@ class FakeMhost(object): 'to': to_addrs, 'message': message}) + def _clear_test_inboxes(): global EMAIL_TEST_INBOX global EMAIL_TEST_MBOX_INBOX EMAIL_TEST_INBOX = [] EMAIL_TEST_MBOX_INBOX = [] + ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### </Special email test stuff> ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |