Fix Dynamodb table key name. Closes #524.
This commit is contained in:
parent
68de6feb01
commit
6803444d61
4 changed files with 33 additions and 10 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue