diff options
author | Davanum Srinivas <davanum@gmail.com> | 2016-02-13 21:22:54 -0500 |
---|---|---|
committer | Davanum Srinivas <davanum@gmail.com> | 2016-02-13 21:29:28 -0500 |
commit | 1fd0f4f69b21cbd20c0eb0e2f8f4506061f4a211 (patch) | |
tree | 05e9a963962c62a50d65cbc1603e5c3be23358e4 /nova/tests/unit/test_crypto.py | |
parent | 9d615b7eec1344264125bfed488391c0648b7031 (diff) | |
download | nova-1fd0f4f69b21cbd20c0eb0e2f8f4506061f4a211.tar.gz |
Tolerate installation of pycryptodome
Newer versions of pysaml2 uses pycryptodome, so if by
accident if this library gets installed, Nova breaks.
paramiko folks are working on this:
https://github.com/paramiko/paramiko/issues/637
In the meanwhile, we should tolerate if either pycrypto
or pycryptodome is installed.
Closes-Bug: #1545370
Change-Id: If88beeb3983705621fe736995939ac20b2daf1f3
Diffstat (limited to 'nova/tests/unit/test_crypto.py')
-rw-r--r-- | nova/tests/unit/test_crypto.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/unit/test_crypto.py b/nova/tests/unit/test_crypto.py index 1a96dfa890..a32e9678f9 100644 --- a/nova/tests/unit/test_crypto.py +++ b/nova/tests/unit/test_crypto.py @@ -361,7 +361,7 @@ class KeyPairTest(test.NoDBTestCase): keyin.seek(0) key = paramiko.RSAKey.from_private_key(keyin) - with mock.patch.object(paramiko.RSAKey, 'generate') as mock_generate: + with mock.patch.object(crypto, 'generate_key') as mock_generate: mock_generate.return_value = key (private_key, public_key, fingerprint) = crypto.generate_key_pair() self.assertEqual(self.rsa_pub, public_key) |