Beispiel #1
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:
         chars = string.ascii_letters + string.digits
         self.assertTrue(c in chars)
Beispiel #2
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:
         chars = string.ascii_letters + string.digits
         self.assertTrue(c in chars)
 def __init__(self):
     self.key = random_str(8)
     self.probability = random.uniform(0.0, 1.0)
 def __init__(self):
     self.key = random_str(8)
     self.probability = random.uniform(0.0, 1.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)