Fix dynamodb_v2 update_item tests
Update expression has the wrong syntax. Something like :bar denotes a placeholder which has to be filled by supplying an additional ExpressionAttributeNames
This commit is contained in:
parent
69888c3baa
commit
cb36a8b10f
1 changed files with 2 additions and 2 deletions
|
|
@ -435,7 +435,7 @@ def test_update_item_remove():
|
|||
}
|
||||
|
||||
# Then remove the SentBy field
|
||||
conn.update_item("messages", key_map, update_expression="REMOVE :SentBy, :SentTo")
|
||||
conn.update_item("messages", key_map, update_expression="REMOVE SentBy, SentTo")
|
||||
|
||||
returned_item = table.get_item(username="steve")
|
||||
dict(returned_item).should.equal({
|
||||
|
|
@ -459,7 +459,7 @@ def test_update_item_set():
|
|||
'username': {"S": "steve"}
|
||||
}
|
||||
|
||||
conn.update_item("messages", key_map, update_expression="SET foo=:bar, blah=:baz REMOVE :SentBy")
|
||||
conn.update_item("messages", key_map, update_expression="SET foo=bar, blah=baz REMOVE SentBy")
|
||||
|
||||
returned_item = table.get_item(username="steve")
|
||||
dict(returned_item).should.equal({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue