Add test for bad describe stack request

This commit is contained in:
Joseph Lawson 2014-10-23 14:46:54 -04:00
parent 90191675a2
commit 04b5389e31

View File

@ -3,8 +3,10 @@ import json
import boto
import sure # noqa
from nose.tools import assert_raises
from moto import mock_cloudformation
from moto.cloudformation.exceptions import ValidationError
dummy_template = {
"AWSTemplateFormatVersion": "2010-09-09",
@ -133,6 +135,17 @@ def test_delete_stack_by_id():
conn.list_stacks().should.have.length_of(0)
@mock_cloudformation
def test_bad_describe_stack():
conn = boto.connect_cloudformation()
with assert_raises(ValidationError) as ve:
conn.describe_stacks("bad_stack")
ve.exception.code.should.equal('ValidationError')
ve.exception.status.should.equal(400)
ve.exception.message.should.contain('bad_stack')
# @mock_cloudformation
# def test_update_stack():
# conn = boto.connect_cloudformation()