def test(value): from pwdmeter import NonASCIIFactor, NonDictionaryFactor, LengthFactor, VarietyFactor, CasemixFactor, CharmixFactor m = Meter([ NonDictionaryFactor(), NonASCIIFactor(), LengthFactor(), VarietyFactor(), CasemixFactor(), CharmixFactor() ]) return m.test(value)
def setUp(self): self.m = Meter([ NonDictionaryFactor(), NonASCIIFactor(), LengthFactor(), VarietyFactor(), CasemixFactor(), CharmixFactor() ]) self.threshold = self.m.threshold super(MeterTest, self).setUp()
def setUp(self): self.factor = LengthFactor(length=8) super(LengthFactorTest, self).setUp()