#NEWLINE# def assert_show_structure( self , items , field_names ) : #NEWLINE# #INDENT# 'Verify that all field_names listed in keys of all items.' #NEWLINE# if isinstance ( items , list ) : #NEWLINE# #INDENT# o = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for d in items : #NEWLINE# #INDENT# o . update ( item_keys ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# o = items #NEWLINE# #UNINDENT# item_keys = o . keys ( ) #NEWLINE# for field in field_names : #NEWLINE# #INDENT# self . assertIn ( field , item_keys )