Exemple #1
0
 def _LoadIdlAPI(self, api):
     idl = idl_parser.IDLParser().ParseData(api)
     generator = HandlebarDictGenerator(
         idl_schema.IDLSchema(idl).process()[0])
     return generator.Generate()
Exemple #2
0
 def _LoadJsonAPI(self, api):
     generator = HandlebarDictGenerator(
         json.loads(json_comment_eater.Nom(api),
                    object_pairs_hook=collections.OrderedDict)[0])
     return generator.Generate()
 def _GenerateTest(self, filename):
     expected_json = json.loads(self._ReadLocalFile('expected_' + filename))
     gen = HandlebarDictGenerator(self._LoadJSON(filename))
     self.assertEquals(expected_json, gen.Generate())
Exemple #4
0
 def _LoadJsonAPI(self, api):
   generator = HandlebarDictGenerator(
       json.loads(json_comment_eater.Nom(api))[0])
   return generator.Generate()
 def _GenerateTest(self, filename):
     expected_json = json.loads(self._ReadLocalFile('expected_' + filename))
     gen = HandlebarDictGenerator(
         json.loads(comment_eater.Nom(self._ReadLocalFile(filename)))[0])
     self.assertEquals(expected_json, gen.Generate())