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)
def test_short_country(self): for x in range(20): c = chance.country(short=True) self.assertTrue(1 < len(c) < 4)
def test_country_returns_string(self): for x in range(20): self.assertEquals(type(chance.country()), text_type)