#NEWLINE# def test_all_media_paths( self ) : #NEWLINE# #INDENT# image_path = 'jr://file/commcare/image{}.jpg' #NEWLINE# audio_path = 'jr://file/commcare/audio{}.mp3' #NEWLINE# app = Application . wrap ( self . get_json ( 'app' ) ) #NEWLINE# app . get_module ( 0 ) . case_list . show = True #NEWLINE# app . get_module ( 0 ) . case_list . set_icon ( 'en' , image_path . format ( '4' ) ) #NEWLINE# app . get_module ( 0 ) . case_list . set_audio ( 'en' , audio_path . format ( '4' ) ) #NEWLINE# app . get_module ( 0 ) . set_icon ( 'en' , image_path . format ( '1' ) ) #NEWLINE# app . get_module ( 0 ) . set_audio ( 'en' , audio_path . format ( '1' ) ) #NEWLINE# app . get_module ( 0 ) . case_list_form . form_id = app . get_module ( 0 ) . get_form ( 0 ) . unique_id #NEWLINE# app . get_module ( 0 ) . case_list_form . set_icon ( 'en' , image_path . format ( '2' ) ) #NEWLINE# app . get_module ( 0 ) . case_list_form . set_audio ( 'en' , audio_path . format ( '2' ) ) #NEWLINE# app . get_module ( 0 ) . get_form ( 0 ) . set_icon ( 'en' , image_path . format ( '3' ) ) #NEWLINE# app . get_module ( 0 ) . get_form ( 0 ) . set_audio ( 'en' , audio_path . format ( '3' ) ) #NEWLINE# should_contain_media = ( [ image_path . format ( num ) for num in [ 1 , 2 , 3 , 4 ] ] + [ audio_path . format ( num ) for num in [ 1 , 2 , 3 , 4 ] ] ) #NEWLINE# self . assertTrue ( app . get_module ( 0 ) . uses_media ( ) ) #NEWLINE# self . assertEqual ( app . all_media_paths , set ( should_contain_media ) )