def testEnums(self):
    gen = self.ApiFromDiscoveryDoc('enums.json')
    # Find the method with the enums
    m1 = gen.MethodByName('language.translations.list')
    language = FindByWireName(m1.values['parameters'], 'language')
    e = language.values['enumType']
    self.assertEquals(m1, e.parent)
    for name, value, desc in e.values['pairs']:
      self.assertTrue(name in ['ENGLISH', 'ITALIAN', 'LANG_ZH_CN',
                               'LANG_ZH_TW'])
      self.assertTrue(value in ['english', 'italian', 'lang_zh-CN',
                                'lang_zh-TW'])
      self.assertTrue(desc in ['English (US)', 'Italian',
                               'Chinese (Simplified)', 'Chinese (Traditional)'])
    accuracy = FindByWireName(m1.values['parameters'], 'accuracy')
    e = accuracy.values['enumType']
    self.assertEquals(m1, e.parent)
    for name, value, desc in e.values['pairs']:
      self.assertTrue(name in ['VALUE_1', 'VALUE_2', 'VALUE_3'])
      self.assertTrue(value in ['1', '2', '3'])
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/api_test.py/ApiTest.testEnums/original