mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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