From 38fa8de4b426821520e85f4ec6f9ef4b753ca38b Mon Sep 17 00:00:00 2001 From: Konstantinos Koukopoulos Date: Mon, 24 Feb 2014 13:35:42 +0200 Subject: [PATCH] test for delete_key_pair --- tests/test_ec2/test_key_pairs.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_ec2/test_key_pairs.py b/tests/test_ec2/test_key_pairs.py index a23516da6..18bc0865b 100644 --- a/tests/test_ec2/test_key_pairs.py +++ b/tests/test_ec2/test_key_pairs.py @@ -51,3 +51,12 @@ def test_key_pairs_delete_no_exist(): assert len(conn.get_all_key_pairs()) == 0 r = conn.delete_key_pair('foo') r.should.be.ok + + +@mock_ec2 +def test_key_pairs_delete_exist(): + conn = boto.connect_ec2('the_key', 'the_secret') + conn.create_key_pair('foo') + r = conn.delete_key_pair('foo') + r.should.be.ok + assert len(conn.get_all_key_pairs()) == 0