Find email_branding by name

This commit is contained in:
Pea Tyczynska
2018-07-30 13:27:49 +01:00
parent f69bc50985
commit d8d94b431f
3 changed files with 16 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
from app.dao.email_branding_dao import (
dao_get_email_branding_options,
dao_get_email_branding_by_id,
dao_get_email_branding_by_name,
dao_update_email_branding,
)
from app.models import EmailBranding
@@ -27,6 +28,14 @@ def test_get_email_branding_by_id_gets_correct_email_branding(notify_db, notify_
assert email_branding_from_db == email_branding
def test_get_email_branding_by_name_gets_correct_email_branding(notify_db, notify_db_session):
email_branding = create_email_branding(name="Crystal Gems")
email_branding_from_db = dao_get_email_branding_by_name("Crystal Gems")
assert email_branding_from_db == email_branding
def test_update_email_branding(notify_db, notify_db_session):
updated_name = 'new name'
create_email_branding()