#NEWLINE# @ classmethod #NEWLINE# def after_setup( cls ) : #NEWLINE# #INDENT# d = cls . data #NEWLINE# session = cls . session ( ) #NEWLINE# with session . begin ( ) as t : #NEWLINE# #INDENT# for g in d . groups : #NEWLINE# #INDENT# t . add ( Group ( name = g ) ) #NEWLINE# #UNINDENT# #UNINDENT# ( yield t . on_result ) #NEWLINE# groups = ( yield session . query ( Group ) . all ( ) ) #NEWLINE# gps = test . populate ( 'choice' , d . size , choice_from = groups ) #NEWLINE# with session . begin ( ) as t : #NEWLINE# #INDENT# for ( p , g ) in zip ( d . persons , gps ) : #NEWLINE# #INDENT# t . add ( cls . model ( name = p , group = g ) ) #NEWLINE# #UNINDENT# #UNINDENT# ( yield t . on_result )