Skip to content

Commit

Permalink
Fix test on Python 3: vault code expects bytes
Browse files Browse the repository at this point in the history
(All tests now succeed on Python 3.5)
  • Loading branch information
mgedmin committed Oct 16, 2015
1 parent 5c70f93 commit ec3ada1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/units/parsing/vault/test_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def test_encrypt_decrypt_aes256(self):
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:
Expand Down

0 comments on commit ec3ada1

Please sign in to comment.