Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: app_test.py

Issue 143263025: Add support to change the status header for gatekeeper-ng. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-build
Patch Set: Rename to use status_header instead of status. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gatekeeper_mailer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app_test.py
diff --git a/app_test.py b/app_test.py
index a6cece4c5157d54ed0ad42999f03ecf125751fd0..3402bad1ca75a528a76944a992763a662665b46f 100644
--- a/app_test.py
+++ b/app_test.py
@@ -528,6 +528,25 @@ class MailTestCase(GaeTestCase):
self.assertEqual(saw, expected)
+ def test_html_format_status(self):
+ import gatekeeper_mailer
+ status_header = ('Perf alert for "%(steps)s" on "%(builder_name)s"')
+ template = gatekeeper_mailer.MailTemplate(self.build_data['waterfall_url'],
+ self.build_data['build_url'],
+ self.build_data['project_name'],
+ 'test@chromium.org',
+ status_header=status_header)
+
+ _, html_content, _ = template.genMessageContent(self.build_data)
+
+ with open(os.path.join(self.test_dir, 'expected_status.html')) as f:
+ expected_html = ' '.join(f.read().splitlines())
+
+ saw = str(BeautifulSoup(html_content)).split()
+ expected = str(BeautifulSoup(expected_html)).split()
+
+ self.assertEqual(saw, expected)
+
def test_hmac_validation(self):
from mailer import Email
message = self.input_json['message']
« no previous file with comments | « no previous file | gatekeeper_mailer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698