#NEWLINE# def test_update_image_id( self ) : #NEWLINE# #INDENT# '\n        When an image is updated, change only version number, not resource id\n        ' #NEWLINE# app = Application . wrap ( self . get_json ( 'app' ) ) #NEWLINE# image_path = 'jr://file/commcare/case_list_image.jpg' #NEWLINE# app . get_module ( 0 ) . case_list_form . set_icon ( 'en' , image_path ) #NEWLINE# app . version = 1 #NEWLINE# app . create_mapping ( CommCareImage ( _id = '123' ) , image_path , save = False ) #NEWLINE# app . set_media_versions ( previous_version = None ) #NEWLINE# old_app = deepcopy ( app ) #NEWLINE# app . version = 2 #NEWLINE# app . create_mapping ( CommCareImage ( _id = '456' ) , image_path , save = False ) #NEWLINE# app . set_media_versions ( previous_version = old_app ) #NEWLINE# old_image = old_app . multimedia_map [ image_path ] #NEWLINE# new_image = app . multimedia_map [ image_path ] #NEWLINE# self . assertEqual ( old_image . unique_id , old_app . unique_id ) #NEWLINE# self . assertNotEqual ( old_image . version , new_image . version )