16
16
17
17
TEST_SECRET_KEY = 'TestKeyTestKeyTestKeyTestKeyTestKeyTestKeyX='
18
18
TEST_ARCHIVE_ADDRESS = '[email protected] '
19
+ TEST_RETURN_ADDRESS = '[email protected] '
19
20
20
21
21
22
@pytest .yield_fixture
@@ -33,6 +34,7 @@ def email_app(app):
33
34
app .config ['SECRET_KEY' ] = TEST_SECRET_KEY
34
35
app .config ['RESET_PASSWORD_SALT' ] = 'PassSalt'
35
36
app .config ['DM_EMAIL_BCC_ADDRESS' ] = TEST_ARCHIVE_ADDRESS
37
+ app .config ['DM_EMAIL_RETURN_ADDRESS' ] = TEST_RETURN_ADDRESS
36
38
yield app
37
39
38
40
@@ -51,7 +53,8 @@ def test_calls_send_email_with_correct_params(email_app, email_client):
51
53
Message = {'Body' : {'Html' : {'Charset' : 'UTF-8' , 'Data' : 'body' }},
52
54
'Subject' : {'Charset' : 'UTF-8' , 'Data' : 'subject' }},
53
55
Destination = {'ToAddresses' : ['email_address' ], 'BccAddresses' : [TEST_ARCHIVE_ADDRESS ]},
54
- Source = u'from_name <from_email>'
56
+ Source = u'from_name <from_email>' ,
57
+ ReturnPath = TEST_RETURN_ADDRESS
55
58
)
56
59
57
60
@@ -87,7 +90,8 @@ def test_calls_send_email_with_alternative_reply_to(email_app, email_client):
87
90
Message = {'Body' : {'Html' : {'Charset' : 'UTF-8' , 'Data' : 'body' }},
88
91
'Subject' : {'Charset' : 'UTF-8' , 'Data' : 'subject' }},
89
92
Destination = {'ToAddresses' : ['email_address' ], 'BccAddresses' : [TEST_ARCHIVE_ADDRESS ]},
90
- Source = u'from_name <from_email>'
93
+ Source = u'from_name <from_email>' ,
94
+ ReturnPath = TEST_RETURN_ADDRESS
91
95
)
92
96
93
97
0 commit comments