#NEWLINE# def testMeta( self ) : #NEWLINE# #INDENT# s = self . session ( ) #NEWLINE# query = s . query ( self . model ) #NEWLINE# qs = ( yield query . load_only ( 'id' ) . all ( ) ) #NEWLINE# for m in qs : #NEWLINE# #INDENT# self . assertEqual ( all . _loadedfields , ( ) ) #NEWLINE# self . assertEqual ( m . has_all_data , False ) #NEWLINE# #UNINDENT# qs = ( yield query . load_only ( 'code' , 'group' ) . all ( ) ) #NEWLINE# for m in qs : #NEWLINE# #INDENT# self . assertEqual ( m . _loadedfields , ( 'code' , 'group' ) ) #NEWLINE# self . assertEqual ( m . has_all_data , False ) #NEWLINE# #UNINDENT# all = ( yield query . all ( ) ) #NEWLINE# for m in all : #NEWLINE# #INDENT# self . assertEqual ( m . _loadedfields , None ) #NEWLINE# self . assertEqual ( m . has_all_data , True ) #NEWLINE# #UNINDENT# m = self . model ( code = 'bla' , group = 'foo' ) #NEWLINE# self . assertEqual ( m . has_all_data , False )