Testing new version of decorator.

This commit is contained in:
Steve Pulec 2017-02-15 22:35:45 -05:00
commit fde721bed7
123 changed files with 2740 additions and 1114 deletions

View file

@ -4,7 +4,7 @@ import boto
import sure # noqa
from freezegun import freeze_time
from moto import mock_dynamodb
from moto import mock_dynamodb_deprecated
from boto.dynamodb import condition
from boto.dynamodb.exceptions import DynamoDBKeyNotFoundError
@ -27,7 +27,7 @@ def create_table(conn):
@freeze_time("2012-01-14")
@mock_dynamodb
@mock_dynamodb_deprecated
def test_create_table():
conn = boto.connect_dynamodb()
create_table(conn)
@ -54,7 +54,7 @@ def test_create_table():
conn.describe_table('messages').should.equal(expected)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_delete_table():
conn = boto.connect_dynamodb()
create_table(conn)
@ -66,7 +66,7 @@ def test_delete_table():
conn.layer1.delete_table.when.called_with('messages').should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_update_table_throughput():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -80,7 +80,7 @@ def test_update_table_throughput():
table.write_units.should.equal(6)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_item_add_and_describe_and_update():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -120,7 +120,7 @@ def test_item_add_and_describe_and_update():
})
@mock_dynamodb
@mock_dynamodb_deprecated
def test_item_put_without_table():
conn = boto.connect_dynamodb()
@ -132,7 +132,7 @@ def test_item_put_without_table():
).should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_get_missing_item():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -142,7 +142,7 @@ def test_get_missing_item():
).should.throw(DynamoDBKeyNotFoundError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_get_item_with_undeclared_table():
conn = boto.connect_dynamodb()
@ -154,7 +154,7 @@ def test_get_item_with_undeclared_table():
).should.throw(DynamoDBKeyNotFoundError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_delete_item():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -181,7 +181,7 @@ def test_delete_item():
item.delete.when.called_with().should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_delete_item_with_attribute_response():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -216,7 +216,7 @@ def test_delete_item_with_attribute_response():
item.delete.when.called_with().should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_delete_item_with_undeclared_table():
conn = boto.connect_dynamodb()
@ -228,7 +228,7 @@ def test_delete_item_with_undeclared_table():
).should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_query():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -248,7 +248,7 @@ def test_query():
results.response['Items'].should.have.length_of(1)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_query_with_undeclared_table():
conn = boto.connect_dynamodb()
@ -258,7 +258,7 @@ def test_query_with_undeclared_table():
).should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_scan():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -318,7 +318,7 @@ def test_scan():
results.response['Items'].should.have.length_of(1)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_scan_with_undeclared_table():
conn = boto.connect_dynamodb()
@ -335,7 +335,7 @@ def test_scan_with_undeclared_table():
).should.throw(DynamoDBResponseError)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_scan_after_has_item():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -346,7 +346,7 @@ def test_scan_after_has_item():
list(table.scan()).should.equal([])
@mock_dynamodb
@mock_dynamodb_deprecated
def test_write_batch():
conn = boto.connect_dynamodb()
table = create_table(conn)
@ -388,7 +388,7 @@ def test_write_batch():
table.item_count.should.equal(1)
@mock_dynamodb
@mock_dynamodb_deprecated
def test_batch_read():
conn = boto.connect_dynamodb()
table = create_table(conn)