Mail signature (#485)

* added signature field -- no function yet

* added mail signature feature

* fixed style issue

* fixed problem with signature default

* added unit test for mail signatures

* added unit test for mail signatures
This commit is contained in:
scabux
2017-05-06 11:12:38 +02:00
committed by Raphael Michel
parent d929b163db
commit 27d6f24c3c
6 changed files with 48 additions and 0 deletions

View File

@@ -48,6 +48,18 @@ def test_send_mail_with_event_sender(env):
assert djmail.outbox[0].from_email == 'foo@bar'
@pytest.mark.django_db
def test_send_mail_with_event_signature(env):
djmail.outbox = []
event, user, organizer = env
event.settings.set('mail_text_signature', 'This is a test signature.')
mail('dummy@dummy.dummy', 'Test subject', 'mailtest.txt', {}, event)
assert len(djmail.outbox) == 1
assert djmail.outbox[0].to == [user.email]
assert 'This is a test signature.' in djmail.outbox[0].body
@pytest.mark.django_db
def test_send_mail_with_default_sender(env):
djmail.outbox = []