Exemplo n.º 1
0
 def test_validate_short(self):
     kf = KeyFile('asdf')
     kf._KeyFile__key = b'x' * 31
     with pytest.raises(EncryptionError):
         kf._validate_key()
Exemplo n.º 2
0
 def test_validate_success(self):
     kf = KeyFile('asdf')
     kf._KeyFile__key = b'x' * 32
     kf._validate_key()
Exemplo n.º 3
0
 def test_validate_none(self):
     kf = KeyFile('asdf')
     with pytest.raises(EncryptionError):
         kf._validate_key()