Merge pull request #425 from ZuluPro/random_key_pair

Remade ec2.utils.random_key_pair for be really random
This commit is contained in:
Steve Pulec 2015-10-05 18:25:17 -04:00
commit 37f86626cc
2 changed files with 22 additions and 19 deletions

View file

@ -0,0 +1,8 @@
from moto.ec2 import utils
def test_random_key_pair():
key_pair = utils.random_key_pair()
assert len(key_pair['fingerprint']) == 59
assert key_pair['material'].startswith('---- BEGIN RSA PRIVATE KEY ----')
assert key_pair['material'].endswith('-----END RSA PRIVATE KEY-----')