From 86b86fc066220f2ed0bebe292da31d4386ef0884 Mon Sep 17 00:00:00 2001 From: Jesse Vera Date: Tue, 29 Mar 2016 16:26:46 -0500 Subject: [PATCH] Fixed DynamoDB 'IN' comparison function --- moto/dynamodb/comparisons.py | 2 +- moto/dynamodb2/comparisons.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/dynamodb/comparisons.py b/moto/dynamodb/comparisons.py index 86f582179..d9b391557 100644 --- a/moto/dynamodb/comparisons.py +++ b/moto/dynamodb/comparisons.py @@ -12,7 +12,7 @@ COMPARISON_FUNCS = { 'CONTAINS': lambda item_value, test_value: test_value in item_value, 'NOT_CONTAINS': lambda item_value, test_value: test_value not in item_value, 'BEGINS_WITH': lambda item_value, test_value: item_value.startswith(test_value), - 'IN': lambda item_value, test_value: item_value in test_value, + 'IN': lambda item_value, *test_values: item_value in test_values, 'BETWEEN': lambda item_value, lower_test_value, upper_test_value: lower_test_value <= item_value <= upper_test_value, } diff --git a/moto/dynamodb2/comparisons.py b/moto/dynamodb2/comparisons.py index 808e120bc..1dc723df0 100644 --- a/moto/dynamodb2/comparisons.py +++ b/moto/dynamodb2/comparisons.py @@ -32,7 +32,7 @@ COMPARISON_FUNCS = { 'CONTAINS': lambda item_value, test_value: test_value in item_value, 'NOT_CONTAINS': lambda item_value, test_value: test_value not in item_value, 'BEGINS_WITH': lambda item_value, test_value: item_value.startswith(test_value), - 'IN': lambda item_value, test_value: item_value in test_value, + 'IN': lambda item_value, *test_values: item_value in test_values, 'BETWEEN': lambda item_value, lower_test_value, upper_test_value: lower_test_value <= item_value <= upper_test_value, }