#NEWLINE# def test_multiple_entries( self ) : #NEWLINE# #INDENT# event = self . save ( ) #NEWLINE# location_id = event . locations [ 0 ] . id #NEWLINE# data = { #NEWLINE# #INDENT# 'name' : 'Some event' , #NEWLINE# 'locations-0-name' : 'Some location' , #NEWLINE# 'locations-1-id' : str ( location_id ) , #NEWLINE# 'locations-1-name' : 'Some other location' , #NEWLINE# 'locations-2-name' : 'Third location' , #NEWLINE# 'locations-3-id' : 123 , #NEWLINE# 'locations-3-name' : 'Fourth location' , #NEWLINE# #UNINDENT# } #NEWLINE# self . save ( event , event ) #NEWLINE# assert ( len ( event . locations ) == 4 ) #NEWLINE# assert ( event . locations [ 0 ] . id == location_id ) #NEWLINE# assert ( event . locations [ 0 ] . name == 'Some other location' ) #NEWLINE# assert ( event . locations [ 1 ] . name == 'Some location' ) #NEWLINE# assert ( event . locations [ 2 ] . name == 'Third location' ) #NEWLINE# assert ( event . locations [ 3 ] . name == 'Fourth location' )