Exemple #1
0
 def test_string_returns_string_from_correct_pool(self):
     pools = (
         'abcdef',
         'hjfj2131',
         '$553\&66hjfj2131',
         '=_-232fdsf',
     )
     for pool in pools:
         s = chance.string(pool=pool)
         for x in s:
             self.assertTrue(pool.find(x) != -1)
Exemple #2
0
 def test_string_returns_string(self):
     for x in range(100):
         self.assertTrue(isinstance(chance.string(), text_type))
Exemple #3
0
 def test_string_returns_string_with_correct_length(self):
     for x in range(1, 100):
         self.assertTrue(len(chance.string(length=x)) == x)
Exemple #4
0
 def test_string_returns_string_with_correct_min_max(self):
     for x in range(1, 100):
         l = len(chance.string(minimum=x, maximum=x+5))
         self.assertTrue(x <= l <= (x+5))
Exemple #5
0
 def test_string_returns_string(self):
     for x in range(100):
         self.assertTrue(isinstance(chance.string(), text_type))