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

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

Issue 65643009: Docserver: Attach intro metadata to the template itself, not to an object which (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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/intro_data_source_test.py
diff --git a/chrome/common/extensions/docs/server2/intro_data_source_test.py b/chrome/common/extensions/docs/server2/intro_data_source_test.py
index 813af22b447694340b644563a6460947d5395142..510f29a7c0f429192c5fa88da416ae8167ff49b4 100755
--- a/chrome/common/extensions/docs/server2/intro_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/intro_data_source_test.py
@@ -17,16 +17,16 @@ class IntroDataSourceTest(unittest.TestCase):
def testIntro(self):
intro_data_source = IntroDataSource(self._server_instance, None)
data = intro_data_source.get('test')
- self.assertEqual('hi', data['title'])
+ self.assertEqual('hi', data.get('title'))
# TODO(kalman): test links.
expected_toc = [{'subheadings': [{'link': '', 'title': u'inner'}],
'link': '',
'title': u'first'},
{'subheadings': [], 'link': '', 'title': u'second'}]
- self.assertEqual(expected_toc, data['apps_toc'])
- self.assertEqual(expected_toc, data['extensions_toc'])
+ self.assertEqual(expected_toc, data.get('toc'))
self.assertEqual('you<h2>first</h2><h3>inner</h3><h2>second</h2>',
- data['intro'].render().text)
+ data.Render().text)
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « chrome/common/extensions/docs/server2/intro_data_source.py ('k') | chrome/common/extensions/docs/server2/render_servlet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698