#NEWLINE# def test_store_commons2( ) : #NEWLINE# #INDENT# store = emails . store . MemoryFileStore ( ) #NEWLINE# f1 = store . add ( { #NEWLINE# #INDENT# 'uri' : '/a/c.gif' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert f1 . filename #NEWLINE# assert f1 . content_id #NEWLINE# assert ( ( f1 in store ) and ( store . uri in store ) ) #NEWLINE# assert ( len ( store ) == 1 ) #NEWLINE# assert ( len ( list ( store . as_dict ( ) ) ) == 1 ) #NEWLINE# with pytest . raises ( ValueError ) : #NEWLINE# #INDENT# store . add ( 'X' ) #NEWLINE# #UNINDENT# store . remove ( f1 ) #NEWLINE# assert ( f1 not in store ) #NEWLINE# assert ( len ( store ) == 0 )