use config to get default sender rather than hardcoding

this means that on non-prod envs, it reflects that environment.

it needs to be a lamdba, because the column object is created at import
time, when current_app.config won't have been loaded - this means that
when you create a Service object, that lambda executes and grabs the
correct default value
This commit is contained in:
Leo Hemsted
2017-05-23 10:35:13 +01:00
parent 2535a7fe98
commit 86c9600b04
4 changed files with 9 additions and 9 deletions

View File

@@ -109,5 +109,4 @@ def test_send_notification_to_service_users_sends_to_active_users_only(
assert Notification.query.count() == 2
assert notifications[0].to == first_active_user.email_address
assert notifications[1].to == second_active_user.email_address
assert pending_user.email_address not in [n.to for n in notifications]