Add pre_send and post_send signals

Closes #8
This commit is contained in:
medmunds
2016-05-12 21:18:04 -07:00
parent d4f6ffbb41
commit f8eafba0df
7 changed files with 303 additions and 3 deletions

View File

@@ -27,8 +27,14 @@ class TestBackendTestCase(SimpleTestCase, AnymailTestMixin):
# Simple message useful for many tests
self.message = AnymailMessage('Subject', 'Text Body', 'from@example.com', ['to@example.com'])
@staticmethod
def get_send_count():
"""Returns number of times "send api" has been called this test"""
return len(recorded_send_params)
@staticmethod
def get_send_params():
"""Returns the params for the most recent "send api" call"""
return recorded_send_params[-1]