コード例 #1
0
ファイル: test_misc.py プロジェクト: wflk/certfuzz
 def test_random_str(self):
     self.assertEqual(1, len(helpers.random_str()))
     random_string = helpers.random_str(100)
     self.assertEqual(100, len(random_string))
     for c in random_string:
         chars = string.ascii_letters + string.digits
         self.assertTrue(c in chars)
コード例 #2
0
ファイル: test_misc.py プロジェクト: LucaBongiorni/certfuzz
 def test_random_str(self):
     self.assertEqual(1, len(helpers.random_str()))
     random_string = helpers.random_str(100)
     self.assertEqual(100, len(random_string))
     for c in random_string:
         chars = string.ascii_letters + string.digits
         self.assertTrue(c in chars)
コード例 #3
0
 def __init__(self):
     self.key = random_str(8)
     self.probability = random.uniform(0.0, 1.0)
コード例 #4
0
 def __init__(self):
     self.key = random_str(8)
     self.probability = random.uniform(0.0, 1.0)
コード例 #5
0
 def test_random_str(self):
     self.assertEqual(1, len(helpers.random_str()))
     random_string = helpers.random_str(100)
     self.assertEqual(100, len(random_string))
     for c in random_string:
         self.assertTrue(c in string.letters)