Suppress tabs permission warning if there is already a browsingHistory warning.
[chromium-blink-merge.git] / chrome / common / extensions / docs / server2 / template_renderer_test.py
blob986b877cb8ccac707c6a735a230ba9b1413d0074
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
6 import unittest
8 from server_instance import ServerInstance
9 from third_party.handlebar import Handlebar
12 class TemplateRendererTest(unittest.TestCase):
13 '''Basic test for TemplateRenderer.
15 When the DataSourceRegistry conversion is finished then we could do some more
16 meaningful tests by injecting a different set of DataSources.
17 '''
19 def setUp(self):
20 self._template_renderer = ServerInstance.ForLocal().template_renderer
22 def testSimpleWiring(self):
23 template = Handlebar('hello {{?true}}{{strings.extension}}{{/}}')
24 text, warnings = self._template_renderer.Render(template, None)
25 self.assertEqual('hello extension', text)
26 self.assertEqual([], warnings)
29 if __name__ == '__main__':
30 unittest.main()