Skip to content

Commit

Permalink
test_pkey.py: Remove test_BestAvailableEncryption as that isnt part o…
Browse files Browse the repository at this point in the history
…f this module.
  • Loading branch information
jhgorrell committed Feb 25, 2017
1 parent 76ad840 commit ca2a15d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions tests/test_pkey.py
Expand Up @@ -29,7 +29,6 @@

from paramiko import RSAKey, DSSKey, ECDSAKey, Message, util
from paramiko.py3compat import StringIO, byte_chr, b, bytes, PY2
from cryptography.hazmat.primitives.serialization import BestAvailableEncryption

from tests.util import test_path

Expand Down Expand Up @@ -446,24 +445,9 @@ def test_stringification(self):
comparable = TEST_KEY_BYTESTR_2 if PY2 else TEST_KEY_BYTESTR_3
self.assertEqual(str(key), comparable)

def test_BestAvailableEncryption(self):
# the ok case:
self.assertTrue(BestAvailableEncryption(b"password"))

# Doesnt work on 2.6, 2.7 & pypy
# bad: not a string
# with self.assertRaises(ValueError):
# BestAvailableEncryption("not bytes")

# Doesnt work on 2.6
# bad: too short
# with self.assertRaises(ValueError):
# BestAvailableEncryption(b"")

def test_keyfile_is_actually_encrypted(self):
# Read an existing encrypted private key
file_ = test_path('test_rsa_password.key')
# @todo: The decryptor takes string or bytes; Whereas encryption only takes bytes.
password = 'television'
newfile = file_ + '.new'
newpassword = 'radio'
Expand Down

0 comments on commit ca2a15d

Please sign in to comment.