def test_validate_short(self): kf = KeyFile('asdf') kf._KeyFile__key = b'x' * 31 with pytest.raises(EncryptionError): kf._validate_key()
def test_validate_success(self): kf = KeyFile('asdf') kf._KeyFile__key = b'x' * 32 kf._validate_key()
def test_validate_none(self): kf = KeyFile('asdf') with pytest.raises(EncryptionError): kf._validate_key()