adding first error handling
This commit is contained in:
parent
e9eb36e58c
commit
1cc0e0eac7
2 changed files with 16 additions and 1 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue