Fix test on Python 3: vault code expects bytes
(All tests now succeed on Python 3.5)
This commit is contained in:
parent
5c70f932bd
commit
ec3ada1cda
1 changed files with 3 additions and 3 deletions
|
@ -115,10 +115,10 @@ class TestVaultLib(unittest.TestCase):
|
|||
raise SkipTest
|
||||
v = VaultLib('ansible')
|
||||
v.cipher_name = 'AES256'
|
||||
enc_data = v.encrypt("foobar")
|
||||
enc_data = v.encrypt(b"foobar")
|
||||
dec_data = v.decrypt(enc_data)
|
||||
assert enc_data != "foobar", "encryption failed"
|
||||
assert dec_data == "foobar", "decryption failed"
|
||||
assert enc_data != b"foobar", "encryption failed"
|
||||
assert dec_data == b"foobar", "decryption failed"
|
||||
|
||||
def test_encrypt_encrypted(self):
|
||||
if not HAS_AES or not HAS_COUNTER or not HAS_PBKDF2:
|
||||
|
|
Loading…
Reference in a new issue