Пример #1
0
def test(value):
    from pwdmeter import NonASCIIFactor, NonDictionaryFactor, LengthFactor, VarietyFactor, CasemixFactor, CharmixFactor
    m = Meter([
        NonDictionaryFactor(),
        NonASCIIFactor(),
        LengthFactor(),
        VarietyFactor(),
        CasemixFactor(),
        CharmixFactor()
    ])
    return m.test(value)
Пример #2
0
 def setUp(self):
     self.m = Meter([
         NonDictionaryFactor(),
         NonASCIIFactor(),
         LengthFactor(),
         VarietyFactor(),
         CasemixFactor(),
         CharmixFactor()
     ])
     self.threshold = self.m.threshold
     super(MeterTest, self).setUp()
Пример #3
0
 def setUp(self):
     self.factor = LengthFactor(length=8)
     super(LengthFactorTest, self).setUp()