#NEWLINE# def test_updating_out_of_date_report( self ) : #NEWLINE# #INDENT# '\n        Test that editing a report for an outdated data source creates a new data source.\n        Data sources are tied to app version.\n        ' #NEWLINE# builder_form = ConfigureListReportForm ( 'Test Report' , self . app . _id , 'form' , self . form . unique_id , existing_report = None , data = { #NEWLINE# #INDENT# 'filters' : '[]' , #NEWLINE# 'columns' : '[{"property": "/data/first_name", "display_text": "first name"}]' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( builder_form . is_valid ( ) ) #NEWLINE# report = builder_form . create_report ( ) #NEWLINE# first_data_source_id = report . config_id #NEWLINE# self . app . save ( ) #NEWLINE# builder_form = ConfigureListReportForm ( 'Test Report' , self . app . _id , 'form' , self . form . unique_id , existing_report = report , data = { #NEWLINE# #INDENT# 'filters' : '[]' , #NEWLINE# 'columns' : '[{"property": "/data/first_name", "display_text": "first name"}]' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( builder_form . is_valid ( ) ) #NEWLINE# report = builder_form . update_report ( ) #NEWLINE# second_data_source_id = report . config_id #NEWLINE# self . assertNotEqual ( first_data_source_id , second_data_source_id )