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

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

Issue 498813002: Rename the docserver third_party dependency "handlebar" to "motemplate", as part (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: imports Created 6 years, 4 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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import unittest 6 import unittest
7 7
8 from server_instance import ServerInstance 8 from server_instance import ServerInstance
9 from third_party.handlebar import Handlebar 9 from third_party.motemplate import Motemplate
10 10
11 11
12 class TemplateRendererTest(unittest.TestCase): 12 class TemplateRendererTest(unittest.TestCase):
13 '''Basic test for TemplateRenderer. 13 '''Basic test for TemplateRenderer.
14 14
15 When the DataSourceRegistry conversion is finished then we could do some more 15 When the DataSourceRegistry conversion is finished then we could do some more
16 meaningful tests by injecting a different set of DataSources. 16 meaningful tests by injecting a different set of DataSources.
17 ''' 17 '''
18 18
19 def setUp(self): 19 def setUp(self):
20 self._template_renderer = ServerInstance.ForLocal().template_renderer 20 self._template_renderer = ServerInstance.ForLocal().template_renderer
21 21
22 def testSimpleWiring(self): 22 def testSimpleWiring(self):
23 template = Handlebar('hello {{?true}}{{strings.extension}}{{/}}') 23 template = Motemplate('hello {{?true}}{{strings.extension}}{{/}}')
24 text, warnings = self._template_renderer.Render(template, None) 24 text, warnings = self._template_renderer.Render(template, None)
25 self.assertEqual('hello extension', text) 25 self.assertEqual('hello extension', text)
26 self.assertEqual([], warnings) 26 self.assertEqual([], warnings)
27 27
28 28
29 if __name__ == '__main__': 29 if __name__ == '__main__':
30 unittest.main() 30 unittest.main()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/template_renderer.py ('k') | third_party/handlebar/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698