def test_state_short_returns_correct_language(self): all_states = [x['abbreviation'] for x in dictionaries.states['en']] for x in range(20): self.assertTrue(chance.state(short=True) in all_states)
def test_short_state(self): for x in range(20): st = chance.state(short=True) self.assertTrue(1 < len(st) < 4)
def test_state_returns_correct_language(self): all_states = [x['name'] for x in dictionaries.states['en']] for x in range(20): self.assertTrue(chance.state() in all_states)
def test_state_returns_string(self): for x in range(20): self.assertEquals(type(chance.state()), text_type)