#NEWLINE# @ requires_boto_gte ( '2.9' ) #NEWLINE# @ mock_dynamodb2 #NEWLINE# def test_item_add_and_describe_and_update( ) : #NEWLINE# #INDENT# table = create_table ( ) #NEWLINE# data = { #NEWLINE# #INDENT# 'forum_name' : 'LOLCat Forum' , #NEWLINE# 'Body' : 'http://url_to_lolcat.gif' , #NEWLINE# 'SentBy' : 'User A' , #NEWLINE# #UNINDENT# } #NEWLINE# table . put_item ( data = data ) #NEWLINE# returned_item = table . get_item ( forum_name = 'LOLCat Forum' ) #NEWLINE# data . should_not . be . none #NEWLINE# dict ( returned_item ) . should . equal ( { #NEWLINE# #INDENT# 'forum_name' : 'LOLCat Forum' , #NEWLINE# 'Body' : 'http://url_to_lolcat.gif' , #NEWLINE# 'SentBy' : 'User A' , #NEWLINE# #UNINDENT# } ) #NEWLINE# returned_item [ 'SentBy' ] = 'User B' #NEWLINE# returned_item . save ( overwrite = True ) #NEWLINE# returned_item = table . get_item ( forum_name = 'LOLCat Forum' ) #NEWLINE# dict ( returned_item ) . should . equal ( { #NEWLINE# #INDENT# 'forum_name' : 'LOLCat Forum' , #NEWLINE# 'Body' : 'http://url_to_lolcat.gif' , #NEWLINE# 'SentBy' : 'User B' , #NEWLINE# #UNINDENT# } )