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

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

Issue 11018003: Extensions Docs Server: Server code for showing properties of properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/handlebar_dict_generator_test.py
diff --git a/chrome/common/extensions/docs/server2/handlebar_dict_generator_test.py b/chrome/common/extensions/docs/server2/handlebar_dict_generator_test.py
index 736fdfb82bfb997b00c6fd9f6077e00f754e03df..fd29e0d52b031833194cba06ca70f9d57d259442 100755
--- a/chrome/common/extensions/docs/server2/handlebar_dict_generator_test.py
+++ b/chrome/common/extensions/docs/server2/handlebar_dict_generator_test.py
@@ -38,6 +38,14 @@ class DictGeneratorTest(unittest.TestCase):
gen = HandlebarDictGenerator(self._LoadJSON(filename))
self.assertEquals(expected_json, gen.Generate())
+ def testCreateId(self):
+ dict_ = HandlebarDictGenerator(self._LoadJSON('test_file.json')).Generate()
+ self.assertEquals('type-TypeA', dict_['types'][0]['id'])
+ self.assertEquals('property-TypeA-b',
+ dict_['types'][0]['properties'][0]['id'])
+ self.assertEquals('method-get', dict_['functions'][0]['id'])
+ self.assertEquals('event-EventA', dict_['events'][0]['id'])
+
def testGenerate(self):
self._GenerateTest('test_file.json')

Powered by Google App Engine
This is Rietveld 408576698