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

Side by Side Diff: chrome/common/extensions/docs/server2/template_utility_test.py

Issue 10500004: Die build.py, Die: Part 2 (LocalFetcher, Handlebar support, build script) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import unittest
7 import test_urlfetch
8
9 from template_utility import TemplateUtility
10
11 def _ReadFile(filename):
12 with open('test_data/template_utility/' + filename) as f:
13 return f.read()
14
15
16 class TemplateUtilityTest(unittest.TestCase):
17 def _RenderTest(self, base):
18 self.assertEquals(_ReadFile(base + '.html'),
19 self.t_util.RenderTemplate(_ReadFile(base + '.json'),
20 _ReadFile(base + '.tmpl')))
21
22 def testRenderTemplate(self):
23 self.t_util = TemplateUtility()
24 self._RenderTest('test1')
25 self._RenderTest('test2')
26
27 if __name__ == '__main__':
28 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698