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

Unified Diff: telemetry/telemetry/util/js_template_unittest.py

Issue 2671693002: [Telemetry] Validate args in js_template rendering (Closed)
Patch Set: fix old api Created 3 years, 11 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
Index: telemetry/telemetry/util/js_template_unittest.py
diff --git a/telemetry/telemetry/util/js_template_unittest.py b/telemetry/telemetry/util/js_template_unittest.py
index ac0b3a5a419e26afdc2ad9af01507b388bbe416d..c3d698aef975bfcb585b513f3ce6a14e759be19c 100644
--- a/telemetry/telemetry/util/js_template_unittest.py
+++ b/telemetry/telemetry/util/js_template_unittest.py
@@ -40,3 +40,7 @@ class JavaScriptTemplateTest(unittest.TestCase):
def testRenderRaisesWithBadLiteralValue(self):
with self.assertRaises(ValueError):
js_template.Render('function() { {{ @code }} }', code=['foo', 'bar'])
+
+ def testRenderRaisesWithUnusedKeywordArgs(self):
+ with self.assertRaises(TypeError):
+ js_template.Render('foo = {{ x }};', x=4, y=5, timemout=6)
« telemetry/telemetry/util/js_template.py ('K') | « telemetry/telemetry/util/js_template.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698