#NEWLINE# @ requires_boto_gte ( '2.9' ) #NEWLINE# @ mock_dynamodb2 #NEWLINE# def test_query( ) : #NEWLINE# #INDENT# table = create_table ( ) #NEWLINE# item_data = { #NEWLINE# #INDENT# 'forum_name' : 'the-key' , #NEWLINE# 'Body' : 'http://url_to_lolcat.gif' , #NEWLINE# 'SentBy' : 'User A' , #NEWLINE# 'ReceivedTime' : '12/9/2011 11:36:03 PM' , #NEWLINE# #UNINDENT# } #NEWLINE# item = Item ( results , item_data ) #NEWLINE# item . save ( overwrite = True ) #NEWLINE# table . count ( ) . should . equal ( 1 ) #NEWLINE# table = Table ( 'messages' ) #NEWLINE# results = table . query ( forum_name__eq = 'the-key' ) #NEWLINE# sum ( ( 1 for _ in results ) ) . should . equal ( 1 )