#2797 - DynamoDB - Allow case insensitive AND in KeyConditionExpression
This commit is contained in:
parent
66b26cd7b0
commit
b1da99aeda
2 changed files with 12 additions and 3 deletions
|
|
@ -1408,6 +1408,13 @@ def test_filter_expression():
|
|||
filter_expr.expr(row1).should.be(True)
|
||||
filter_expr.expr(row2).should.be(False)
|
||||
|
||||
# lowercase AND test
|
||||
filter_expr = moto.dynamodb2.comparisons.get_filter_expression(
|
||||
"Id > :v0 and Subs < :v1", {}, {":v0": {"N": "5"}, ":v1": {"N": "7"}}
|
||||
)
|
||||
filter_expr.expr(row1).should.be(True)
|
||||
filter_expr.expr(row2).should.be(False)
|
||||
|
||||
# OR test
|
||||
filter_expr = moto.dynamodb2.comparisons.get_filter_expression(
|
||||
"Id = :v0 OR Id=:v1", {}, {":v0": {"N": "5"}, ":v1": {"N": "8"}}
|
||||
|
|
@ -2719,7 +2726,7 @@ def test_query_gsi_with_range_key():
|
|||
res = dynamodb.query(
|
||||
TableName="test",
|
||||
IndexName="test_gsi",
|
||||
KeyConditionExpression="gsi_hash_key = :gsi_hash_key AND gsi_range_key = :gsi_range_key",
|
||||
KeyConditionExpression="gsi_hash_key = :gsi_hash_key and gsi_range_key = :gsi_range_key",
|
||||
ExpressionAttributeValues={
|
||||
":gsi_hash_key": {"S": "key1"},
|
||||
":gsi_range_key": {"S": "range1"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue