#NEWLINE# def test_set_retrieve_and_delete_object( self ) : #NEWLINE# #INDENT# 'Test set_object, retrieve_object, and delete_object methods' #NEWLINE# template = { #NEWLINE# #INDENT# 'username' : 'user:%(id)s:username' , #NEWLINE# 'email' : 'user:%(id)s:email' , #NEWLINE# 'phone' : 'phone:%(id)s:phone' , #NEWLINE# #UNINDENT# } #NEWLINE# indexes = { #NEWLINE# #INDENT# 'id' : 12345 , #NEWLINE# #UNINDENT# } #NEWLINE# data = { #NEWLINE# #INDENT# 'username' : 'Bob' , #NEWLINE# 'email' : 'bob@example.com' , #NEWLINE# 'phone' : '555-555-5555' , #NEWLINE# #UNINDENT# } #NEWLINE# cache . set_object ( self . _cache , template , indexes , data ) #NEWLINE# result = cache . retrieve_object ( self . _cache , template , indexes ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'username' : b'Bob' , #NEWLINE# 'email' : b'bob@example.com' , #NEWLINE# 'phone' : b'555-555-5555' , #NEWLINE# #UNINDENT# } , result ) #NEWLINE# cache . delete_object ( self . _cache , template , indexes ) #NEWLINE# result = cache . retrieve_object ( self . _cache , template , indexes ) #NEWLINE# self . assertEqual ( None , result )