adding first error handling

This commit is contained in:
zmsmith 2013-03-10 15:46:27 -04:00
commit 1cc0e0eac7
2 changed files with 16 additions and 1 deletions

View file

@ -5,6 +5,8 @@ from freezegun import freeze_time
from moto import mock_dynamodb
from moto.dynamodb import dynamodb_backend
from boto.exception import DynamoDBResponseError
@mock_dynamodb
def test_list_tables():
@ -14,6 +16,12 @@ def test_list_tables():
assert conn.list_tables() == ['TestTable']
@mock_dynamodb
def test_describe_missing_table():
conn = boto.connect_dynamodb('the_key', 'the_secret')
conn.describe_table.when.called_with('messages').should.throw(DynamoDBResponseError)
@freeze_time("2012-01-14")
@mock_dynamodb
def test_describe_table():