'Test delete non-existent key.'

def test_delete_key_not_found(self):

    test_res = self._get_test_resource(self.kp_template)
    test_res.resource_id = 'key_name'
    test_res.state_set(test_res.CREATE, test_res.COMPLETE)
    self.patchobject(self.fake_keypairs, 'delete', side_effect=fakes_nova.fake_exception())
    scheduler.TaskRunner(test_res.delete)()
    self.assertEqual((test_res.DELETE, test_res.COMPLETE), test_res.state)
