コード例 #1
0
ファイル: test_utils.py プロジェクト: F483/ngcccbase
 def test_is_random(self):
   self.assertTrue(make_random_id() != make_random_id())
コード例 #2
0
ファイル: test_utils.py プロジェクト: F483/ngcccbase
 def test_is_hex_str(self):
   is_hex = lambda x: bool(re.match("[0123456789abcdef]*", x))
   self.assertTrue(is_hex(make_random_id()))
コード例 #3
0
ファイル: test_utils.py プロジェクト: F483/ngcccbase
 def test_at_least_8_bytes_of_entropy(self):
   self.assertTrue(len(make_random_id()) >= 16)
コード例 #4
0
 def test_is_random(self):
     self.assertTrue(make_random_id() != make_random_id())
コード例 #5
0
 def test_is_hex_str(self):
     is_hex = lambda x: bool(re.match("[0123456789abcdef]*", x))
     self.assertTrue(is_hex(make_random_id()))
コード例 #6
0
 def test_at_least_8_bytes_of_entropy(self):
     self.assertTrue(len(make_random_id()) >= 16)