Esempio n. 1
0
    def test_career(self):
        career = hsdata.Career('MAGE')
        self.assertEqual(career.name, '法师')
        self.assertEqual(career.__repr__(), '<Career: 法师 (MAGE)>')

        hsdata.set_main_language('enUS')
        career = hsdata.Career('MAGE')
        self.assertEqual(career.name, 'Mage')
Esempio n. 2
0
    def test_careers(self):
        self.assertEqual(len(hsdata.CAREERS), 11)
        self.assertEqual(hsdata.CAREERS.get('HUNTER').name, '猎人')

        hsdata.Cards()
        self.assertEqual(hsdata.CAREERS.search('雷 萨').name, '猎人')
        self.assertEqual(hsdata.CAREERS.search('迪,麦 文').name, '法师')

        hsdata.set_main_language('enUS')
        hsdata.Cards()
        self.assertEqual(hsdata.CAREERS.search('Rexxar').name, 'Hunter')
Esempio n. 3
0
 def setUp(self):
     if hsdata.core.MAIN_LANGUAGE != 'zhCN':
         hsdata.set_main_language('zhCN')