Ejemplo n.º 1
0
 def test_various_examples(self):
     assert complexity_score('H3LLO_WORLD') == 3
     assert complexity_score('nen9aPhu') == 3
     assert complexity_score('Ba$th5to') == 4
     assert complexity_score('Dre1käse') == 5
     assert complexity_score('Oo7,28=r+MU}') == 6
Ejemplo n.º 2
0
 def test_symbols_numbers_end(self):
     assert complexity_score('password1') == 2
     assert complexity_score('password1234') == 2
     assert complexity_score('password!') == 2
     assert complexity_score('password1!') == 2
     assert complexity_score('PaSsWoRd1234!@#%') == 2
Ejemplo n.º 3
0
 def test_foreign_characters(self):
     assert complexity_score('wasserschloß') == 2  # At the end
     assert complexity_score('waſſerſchloſs') == 4
     assert complexity_score('pass\u0be7word') == 3
     assert complexity_score('pass\u0be7\u0be8\u0be9word') == 4
Ejemplo n.º 4
0
 def test_symbols(self):
     assert complexity_score('pass$#word') == 3
     assert complexity_score('q\'w"e%r&t>') == 3
     assert complexity_score('pass$word') == 2
Ejemplo n.º 5
0
 def test_spaces(self):
     assert complexity_score('hello beautiful world') == 3
     assert complexity_score('hello world') == 2
Ejemplo n.º 6
0
 def test_mixed_case(self):
     assert complexity_score('hello') == 1
     assert complexity_score('HELLO') == 1
     assert complexity_score('hELlO') == 2
Ejemplo n.º 7
0
 def test_numbers(self):
     assert complexity_score('pass123word') == 3
     assert complexity_score('q1w2e3r4t5') == 3
     assert complexity_score('pass1word') == 2
Ejemplo n.º 8
0
 def test_various_examples(self):
     assert complexity_score('H3LLO_WORLD') == 3
     assert complexity_score('nen9aPhu') == 3
     assert complexity_score('Ba$th5to') == 4
     assert complexity_score('Dre1käse') == 5
     assert complexity_score('Oo7,28=r+MU}') == 6
Ejemplo n.º 9
0
 def test_lowest_score(self):
     assert complexity_score('password') == 1
     assert complexity_score('qwertyuiop') == 1
Ejemplo n.º 10
0
 def test_symbols_numbers_end(self):
     assert complexity_score('password1') == 2
     assert complexity_score('password1234') == 2
     assert complexity_score('password!') == 2
     assert complexity_score('password1!') == 2
     assert complexity_score('PaSsWoRd1234!@#%') == 2
Ejemplo n.º 11
0
 def test_foreign_characters(self):
     assert complexity_score('wasserschloß') == 2  # At the end
     assert complexity_score('waſſerſchloſs') == 4
     assert complexity_score('pass\u0be7word') == 3
     assert complexity_score('pass\u0be7\u0be8\u0be9word') == 4
Ejemplo n.º 12
0
 def test_spaces(self):
     assert complexity_score('hello beautiful world') == 3
     assert complexity_score('hello world') == 2
Ejemplo n.º 13
0
 def test_symbols(self):
     assert complexity_score('pass$#word') == 3
     assert complexity_score('q\'w"e%r&t>') == 3
     assert complexity_score('pass$word') == 2
Ejemplo n.º 14
0
 def test_numbers(self):
     assert complexity_score('pass123word') == 3
     assert complexity_score('q1w2e3r4t5') == 3
     assert complexity_score('pass1word') == 2
Ejemplo n.º 15
0
 def test_mixed_case(self):
     assert complexity_score('hello') == 1
     assert complexity_score('HELLO') == 1
     assert complexity_score('hELlO') == 2
Ejemplo n.º 16
0
 def test_lowest_score(self):
     assert complexity_score('password') == 1
     assert complexity_score('qwertyuiop') == 1