def fuzz_setting_salt_size(self): # workaround for django14 regression -- # 1.4 won't accept hashes with empty salt strings, unlike 1.3 and earlier. # looks to be fixed in a future release -- https://code.djangoproject.com/ticket/18144 # for now, we avoid salt_size==0 under 1.4 handler = self.handler from lib.passlib.tests.test_ext_django import has_django14 default = handler.default_salt_size assert handler.min_salt_size == 0 lower = 1 if has_django14 else 0 upper = handler.max_salt_size or default*4 return randintgauss(lower, upper, default, default*.5)
def fuzz_setting_rounds(self): # decrease default rounds for fuzz testing to speed up volume. return randintgauss(5, 8, 6, 1)