#NEWLINE# def _assertHasAllStrings( self , app , strings ) : #NEWLINE# #INDENT# et = etree . XML ( app ) #NEWLINE# locale_elems = et . findall ( './/locale/[@id]' ) #NEWLINE# locale_strings = [ elem . attrib [ 'id' ] for elem in locale_elems ] #NEWLINE# app_strings = commcare_translations . loads ( strings ) #NEWLINE# for string in locale_strings : #NEWLINE# #INDENT# if ( string not in app_strings ) : #NEWLINE# #INDENT# raise AssertionError ( ( 'App strings did not contain %s' % string ) ) #NEWLINE# #UNINDENT# if ( not app_strings . get ( string , '' ) . strip ( ) ) : #NEWLINE# #INDENT# raise AssertionError ( ( 'App strings has blank entry for %s' % string ) )