From 81f96c4ceb1934f317901bea98012bb8926839c6 Mon Sep 17 00:00:00 2001 From: Gary Donovan Date: Wed, 17 Oct 2018 11:08:44 +1100 Subject: [PATCH] Don't compare a dict_keys object to a list, since it is always False --- moto/dynamodb2/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index 63ad20df6..a54c4f7d0 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -265,9 +265,9 @@ class Item(BaseModel): self.attrs[attribute_name] = DynamoType({"SS": new_value}) elif isinstance(new_value, dict): self.attrs[attribute_name] = DynamoType({"M": new_value}) - elif update_action['Value'].keys() == ['N']: + elif set(update_action['Value'].keys()) == set(['N']): self.attrs[attribute_name] = DynamoType({"N": new_value}) - elif update_action['Value'].keys() == ['NULL']: + elif set(update_action['Value'].keys()) == set(['NULL']): if attribute_name in self.attrs: del self.attrs[attribute_name] else: