Esempio n. 1
0
 def test_is_random(self):
   self.assertTrue(make_random_id() != make_random_id())
Esempio n. 2
0
 def test_is_hex_str(self):
   is_hex = lambda x: bool(re.match("[0123456789abcdef]*", x))
   self.assertTrue(is_hex(make_random_id()))
Esempio n. 3
0
 def test_at_least_8_bytes_of_entropy(self):
   self.assertTrue(len(make_random_id()) >= 16)
Esempio n. 4
0
 def test_is_random(self):
     self.assertTrue(make_random_id() != make_random_id())
Esempio n. 5
0
 def test_is_hex_str(self):
     is_hex = lambda x: bool(re.match("[0123456789abcdef]*", x))
     self.assertTrue(is_hex(make_random_id()))
Esempio n. 6
0
 def test_at_least_8_bytes_of_entropy(self):
     self.assertTrue(len(make_random_id()) >= 16)