Remade ec2.utils.random_key_pair for be really random
This commit is contained in:
parent
f72613cc47
commit
23c2e7835e
2 changed files with 22 additions and 19 deletions
8
tests/test_ec2/test_utils.py
Normal file
8
tests/test_ec2/test_utils.py
Normal 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-----')
|
||||
Loading…
Add table
Add a link
Reference in a new issue