Add additional put_item test with an attribute_exists condition.
This commit is contained in:
parent
74b56faafd
commit
bfc664cca8
1 changed files with 9 additions and 0 deletions
|
|
@ -1072,6 +1072,15 @@ def test_boto3_put_item_with_conditions():
|
||||||
ConditionExpression='attribute_not_exists(forum_name) AND attribute_not_exists(subject)'
|
ConditionExpression='attribute_not_exists(forum_name) AND attribute_not_exists(subject)'
|
||||||
).should.throw(botocore.exceptions.ClientError)
|
).should.throw(botocore.exceptions.ClientError)
|
||||||
|
|
||||||
|
table.put_item.when.called_with(
|
||||||
|
Item={
|
||||||
|
'forum_name': 'bogus-key',
|
||||||
|
'subject': 'bogus',
|
||||||
|
'test': '123'
|
||||||
|
},
|
||||||
|
ConditionExpression='attribute_exists(forum_name) AND attribute_exists(subject)'
|
||||||
|
).should.throw(botocore.exceptions.ClientError)
|
||||||
|
|
||||||
|
|
||||||
def _create_table_with_range_key():
|
def _create_table_with_range_key():
|
||||||
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
|
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue