Fix Dynamodb table key name. Closes #524.

This commit is contained in:
Steve Pulec 2016-05-05 22:14:23 -04:00
commit 6803444d61
4 changed files with 33 additions and 10 deletions

View file

@ -1288,7 +1288,7 @@ def test_boto3_query_gsi_range_comparison():
@mock_dynamodb2
def test_update_table_throughput():
def test_boto3_update_table_throughput():
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
# Create the DynamoDB table.
@ -1336,7 +1336,7 @@ def test_update_table_throughput():
@mock_dynamodb2
def test_update_table_gsi_throughput():
def test_boto3_update_table_gsi_throughput():
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
# Create the DynamoDB table.

View file

@ -519,6 +519,31 @@ def test_conflicting_writes():
boto3
"""
@mock_dynamodb2
def test_boto3_create_table():
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
table = dynamodb.create_table(
TableName='users',
KeySchema=[
{
'AttributeName': 'username',
'KeyType': 'HASH'
},
],
AttributeDefinitions=[
{
'AttributeName': 'username',
'AttributeType': 'S'
},
],
ProvisionedThroughput={
'ReadCapacityUnits': 5,
'WriteCapacityUnits': 5
}
)
table.name.should.equal('users')
def _create_user_table():
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')