示例#1
0
文件: tests.py 项目: nhiggin5/chance
 def test_country_short_returns_correct_language(self):
     all_states = [x['code'] for x in dictionaries.countries['en']]
     for x in range(20):
         self.assertTrue(chance.country(short=True) in all_states)
示例#2
0
文件: tests.py 项目: nhiggin5/chance
 def test_short_country(self):
     for x in range(20):
         c = chance.country(short=True)
         self.assertTrue(1 < len(c) < 4)
示例#3
0
文件: tests.py 项目: nhiggin5/chance
 def test_country_returns_string(self):
     for x in range(20):
         self.assertEquals(type(chance.country()), text_type)
示例#4
0
文件: tests.py 项目: davitv/chance
 def test_country_short_returns_correct_language(self):
     all_states = [x['code'] for x in dictionaries.countries['en']]
     for x in range(20):
         self.assertTrue(chance.country(short=True) in all_states)
示例#5
0
文件: tests.py 项目: davitv/chance
 def test_short_country(self):
     for x in range(20):
         c = chance.country(short=True)
         self.assertTrue(1 < len(c) < 4)
示例#6
0
文件: tests.py 项目: davitv/chance
 def test_country_returns_string(self):
     for x in range(20):
         self.assertEquals(type(chance.country()), text_type)