fixing some failing tests in the email logic, due to changes in the static asset paths.

This commit is contained in:
Dan 2020-12-28 14:20:32 -05:00
parent 90501bfecc
commit 153d9a78be
3 changed files with 5 additions and 5 deletions

View File

@ -81,13 +81,13 @@ class NotificationService(object):
link = self.get_link(sample)
subject = "UVA: BE SAFE Notification"
tracking_code = self._tracking_code()
text_body = render_template("result_email.txt",
text_body = render_template("pages/result_email.txt",
link=link,
base_url=self.URL_ROOT,
sample=sample,
tracking_code=tracking_code)
html_body = render_template("result_email.html",
html_body = render_template("pages/result_email.html",
link=link,
base_url=self.URL_ROOT,
sample=sample,
@ -162,7 +162,7 @@ class NotificationService(object):
# Embed the logo image
# This example assumes the image is in the current directory
fp = open(join(app.root_path, 'static', 'uva_logo.png'), 'rb')
fp = open(join(app.root_path, 'static', 'assets', 'img', 'brand', 'uva_logo.png'), 'rb')
msgImage = MIMEImage(fp.read())
fp.close()
# Define the image's ID as referenced above

View File

@ -1,4 +1,4 @@
{% extends "base_email.html" %}
{% extends "pages/base_email.html" %}
{% block content %}
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px; Margin-top: 20px;">
Dear Student,

View File

@ -1,4 +1,4 @@
{% extends "base_email.html" %}
{% extends "pages/base_email.html" %}
{% block content %}
<p style="font-family: sans-serif; font-size: 24px; font-weight: bold; margin: 0; Margin-bottom: 15px;">
You have a new notification from the University of Virginia saliva screening system.