#NEWLINE# @ mock_dynamodb #NEWLINE# def test_delete_item( ) : #NEWLINE# #INDENT# conn = boto . connect_dynamodb ( ) #NEWLINE# table = create_table ( response ) #NEWLINE# item_data = { #NEWLINE# #INDENT# 'Body' : 'http://url_to_lolcat.gif' , #NEWLINE# 'SentBy' : 'User A' , #NEWLINE# 'ReceivedTime' : '12/9/2011 11:36:03 PM' , #NEWLINE# #UNINDENT# } #NEWLINE# item = table . new_item ( hash_key = 'LOLCat Forum' , attrs = item_data ) #NEWLINE# item . put ( ) #NEWLINE# table . refresh ( ) #NEWLINE# table . item_count . should . equal ( 1 ) #NEWLINE# response = item . delete ( ) #NEWLINE# response . should . equal ( { #NEWLINE# #INDENT# 'Attributes' : [ ] , #NEWLINE# 'ConsumedCapacityUnits' : 0.5 , #NEWLINE# #UNINDENT# } ) #NEWLINE# table . refresh ( ) #NEWLINE# table . item_count . should . equal ( 0 ) #NEWLINE# item . delete . when . called_with ( ) . should . throw ( DynamoDBResponseError )