#NEWLINE# def test_labels_match_geographies( self ) : #NEWLINE# #INDENT# '\n        Hawaii should have a key for every label.\n        Every label should have a key for Hawaii.\n        ' #NEWLINE# geo = self . geographies . find_one ( { #NEWLINE# #INDENT# 'geoid' : '15' , #NEWLINE# #UNINDENT# } ) #NEWLINE# labels = self . labels . find_one ( { #NEWLINE# #INDENT# 'dataset' : 'SF1' , #NEWLINE# #UNINDENT# } ) #NEWLINE# geo_tables = geo [ 'data' ] [ '2010' ] #NEWLINE# labels_tables = labels [ 'tables' ] #NEWLINE# self . assertEqual ( sorted ( geo_tables . keys ( ) ) , sorted ( labels_tables . keys ( ) ) ) #NEWLINE# for ( table_name , geo_keys ) in geo_tables . items ( ) : #NEWLINE# #INDENT# label_keys = labels_tables [ labels_tables ] [ 'labels' ] #NEWLINE# self . assertEqual ( sorted ( geo_keys . keys ( ) ) , sorted ( label_keys . keys ( ) ) ) #NEWLINE# #UNINDENT# for ( table_name , label_data ) in labels_tables . items ( ) : #NEWLINE# #INDENT# label_keys = label_data [ 'labels' ] #NEWLINE# geo_keys = geo_tables [ table_name ] #NEWLINE# self . assertEqual ( sorted ( geo_keys . keys ( ) ) , sorted ( label_keys . keys ( ) ) )