class TestLetters(unittest.TestCase): def setUp(self): self.rs = Rstr() def test_letters(self): assert re.match('^[a-zA-Z]{1,10}$', self.rs.letters()) def test_letters_include(self): assert re.match('^[a-zA-Z]*@[a-zA-Z]*$', self.rs.letters(include='@')) def test_letters_exclude(self): for _ in xrange(0, 100): assert 'A' not in self.rs.letters(exclude='A')