aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/mail.py
diff options
context:
space:
mode:
authorlora <lorochka85@gmail.com>2011-11-19 17:01:40 -0600
committerlora <lorochka85@gmail.com>2011-11-19 17:01:40 -0600
commit707001950a42c7adfd6657f227a2c2dbbd09afce (patch)
tree9a7215448098b8681b2b45fe636eb8af6c3ea8ba /mediagoblin/tools/mail.py
parent2d62e9efd210becd30982e65e06a6ef97029b391 (diff)
parentaea6d577cbf4d937427dea173f74fb17ad45bd75 (diff)
downloadmediagoblin-707001950a42c7adfd6657f227a2c2dbbd09afce.tar.lz
mediagoblin-707001950a42c7adfd6657f227a2c2dbbd09afce.tar.xz
mediagoblin-707001950a42c7adfd6657f227a2c2dbbd09afce.zip
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
Diffstat (limited to 'mediagoblin/tools/mail.py')
-rw-r--r--mediagoblin/tools/mail.py7
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>
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~