@@ -467,15 +467,15 @@ def test_remove_action(self):
467
467
assert expression_attribute_values == {}
468
468
469
469
def test_add_action (self ):
470
- action = Path ('foo' ).update (0 )
470
+ action = Path ('foo' ).add (0 )
471
471
placeholder_names , expression_attribute_values = {}, {}
472
472
expression = action .serialize (placeholder_names , expression_attribute_values )
473
473
assert expression == "#0 :0"
474
474
assert placeholder_names == {'foo' : '#0' }
475
475
assert expression_attribute_values == {':0' : {'N' : '0' }}
476
476
477
477
def test_add_action_set (self ):
478
- action = NumberSetAttribute (attr_name = 'foo' ).update ({'NS' : ['0' ]})
478
+ action = NumberSetAttribute (attr_name = 'foo' ).add ({'NS' : ['0' ]})
479
479
placeholder_names , expression_attribute_values = {}, {}
480
480
expression = action .serialize (placeholder_names , expression_attribute_values )
481
481
assert expression == "#0 :0"
@@ -484,10 +484,10 @@ def test_add_action_set(self):
484
484
485
485
def test_add_action_list (self ):
486
486
with self .assertRaises (ValueError ):
487
- Path ('foo' ).update ({'L' : [{'N' : '0' }]})
487
+ Path ('foo' ).add ({'L' : [{'N' : '0' }]})
488
488
489
489
def test_delete_action (self ):
490
- action = NumberSetAttribute (attr_name = 'foo' ).difference_update ({'NS' : ['0' ]})
490
+ action = NumberSetAttribute (attr_name = 'foo' ).delete ({'NS' : ['0' ]})
491
491
placeholder_names , expression_attribute_values = {}, {}
492
492
expression = action .serialize (placeholder_names , expression_attribute_values )
493
493
assert expression == "#0 :0"
@@ -496,14 +496,14 @@ def test_delete_action(self):
496
496
497
497
def test_delete_action_non_set (self ):
498
498
with self .assertRaises (ValueError ):
499
- Path ('foo' ).difference_update ({'N' : '0' })
499
+ Path ('foo' ).delete ({'N' : '0' })
500
500
501
501
def test_update (self ):
502
502
update = Update (
503
503
self .attribute .set ({'S' : 'bar' }),
504
504
self .attribute .remove (),
505
- self .attribute .update ({'N' : '0' }),
506
- self .attribute .difference_update ({'NS' : ['0' ]})
505
+ self .attribute .add ({'N' : '0' }),
506
+ self .attribute .delete ({'NS' : ['0' ]})
507
507
)
508
508
placeholder_names , expression_attribute_values = {}, {}
509
509
expression = update .serialize (placeholder_names , expression_attribute_values )
0 commit comments