add test for create_key_pair
This commit is contained in:
parent
d438b05d41
commit
c688e43a9a
@ -8,3 +8,10 @@ from moto import mock_ec2
|
|||||||
def test_key_pairs_empty():
|
def test_key_pairs_empty():
|
||||||
conn = boto.connect_ec2('the_key', 'the_secret')
|
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||||
assert len(conn.get_all_key_pairs()) == 0
|
assert len(conn.get_all_key_pairs()) == 0
|
||||||
|
|
||||||
|
|
||||||
|
@mock_ec2
|
||||||
|
def test_key_pairs_create():
|
||||||
|
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||||
|
kp = conn.create_key_pair('foo')
|
||||||
|
assert kp.material.startswith('-----BEGIN RSA PRIVATE KEY-----')
|
||||||
|
Loading…
Reference in New Issue
Block a user