示例#1
0
文件: test_bn.py 项目: mcepl/M2Crypto
 def test_randfname(self):
     m = re.compile('^[a-zA-Z0-9]{8}$')
     for x in range(loops):
         with warnings.catch_warnings():
             warnings.simplefilter('ignore', DeprecationWarning)
             r = BN.randfname(8)
         assert m.match(r)
示例#2
0
 def test_randfname(self):
     m = re.compile('^[a-zA-Z0-9]{8}$')
     for x in range(loops):
         with warnings.catch_warnings():
             warnings.simplefilter('ignore', DeprecationWarning)
             r = BN.randfname(8)
         assert m.match(r)
示例#3
0
 def test_randfname(self):
     m = re.compile('^[a-zA-Z0-9]{8}$')
     for x in range(loops):
         r = BN.randfname(8)
         assert m.match(r)
示例#4
0
 def test_randfname(self):
     m = re.compile('^[a-zA-Z0-9]{8}$')
     for x in range(loops):
         r = BN.randfname(8)
         assert m.match(r)
示例#5
0
    def _makeRandomProfileDir(pattern):
        import M2Crypto.BN as BN

        profileDir = pattern.replace("*", "%s") % (BN.randfname(8))
        os.makedirs(profileDir, 0700)
        return profileDir