#NEWLINE# def test_serialization( self ) : #NEWLINE# #INDENT# '\n        Test the serialization of the dict-backed models, seeing that\n        the correct objects are returned when called\n        ' #NEWLINE# ref = ItemReference ( ) #NEWLINE# ref . _prop_dict = { #NEWLINE# #INDENT# 'id' : 'thisisa!test' , #NEWLINE# #UNINDENT# } #NEWLINE# response = { #NEWLINE# #INDENT# 'name' : 'test1' , #NEWLINE# 'folder' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'parentReference' : ref . _prop_dict , #NEWLINE# 'lastModifiedDateTime' : '2015-07-09T22:22:53.993000Z' , #NEWLINE# #UNINDENT# } #NEWLINE# item = Item ( ) #NEWLINE# item . _prop_dict = response #NEWLINE# assert ( type ( item . folder ) is Folder ) #NEWLINE# assert ( item . name == 'test1' ) #NEWLINE# assert ( type ( item . parent_reference ) is ItemReference ) #NEWLINE# assert ( response . parent_reference . id == 'thisisa!test' ) #NEWLINE# assert ( type ( item . last_modified_date_time ) == datetime ) #NEWLINE# assert ( ( item . last_modified_date_time . isoformat ( ) + 'Z' ) == response [ 'lastModifiedDateTime' ] )