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)
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)
def _makeRandomProfileDir(pattern): import M2Crypto.BN as BN profileDir = pattern.replace("*", "%s") % (BN.randfname(8)) os.makedirs(profileDir, 0700) return profileDir