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

Unified Diff: chrome/common/extensions/docs/server2/template_data_source_test.py

Issue 11315018: Extensions Docs Server: Generalize $ref's to work for any schema node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 1 month 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: chrome/common/extensions/docs/server2/template_data_source_test.py
diff --git a/chrome/common/extensions/docs/server2/template_data_source_test.py b/chrome/common/extensions/docs/server2/template_data_source_test.py
index d4861f1a2ae381428d80e1039f5c548bfdc30b0f..afd8c3809ed9a4a62829437509b352dd86ff7117 100755
--- a/chrome/common/extensions/docs/server2/template_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/template_data_source_test.py
@@ -70,13 +70,13 @@ class TemplateDataSourceTest(unittest.TestCase):
self._fake_api_data_source_factory, cache_factory)
template_a1 = Handlebar(self._ReadLocalFile('test1.html'))
self.assertEqual(template_a1.render({}, {'templates': {}}).text,
- t_data_source['test1'].render({}, {'templates': {}}).text)
+ t_data_source.get('test1').render({}, {'templates': {}}).text)
template_a2 = Handlebar(self._ReadLocalFile('test2.html'))
self.assertEqual(template_a2.render({}, {'templates': {}}).text,
- t_data_source['test2'].render({}, {'templates': {}}).text)
+ t_data_source.get('test2').render({}, {'templates': {}}).text)
- self.assertEqual(None, t_data_source['junk.html'])
+ self.assertEqual(None, t_data_source.get('junk.html'))
def testPartials(self):
self._base_path = os.path.join(self._base_path, 'partials')
@@ -86,7 +86,7 @@ class TemplateDataSourceTest(unittest.TestCase):
self._fake_api_data_source_factory, cache_factory)
self.assertEqual(
self._ReadLocalFile('test_expected.html'),
- t_data_source['test_tmpl'].render(
+ t_data_source.get('test_tmpl').render(
json.loads(self._ReadLocalFile('input.json')), t_data_source).text)
def testRender(self):

Powered by Google App Engine
This is Rietveld 408576698