#NEWLINE# def populate( self , nbUsers ) : #NEWLINE# #INDENT# 'Create nbUsers in fake database.' #NEWLINE# users = [ ] #NEWLINE# f = faker . Faker ( ) #NEWLINE# for i in range ( nbUsers ) : #NEWLINE# #INDENT# ( user , addr ) = self . create_user ( f . name ( ) , f . address ( ) ) #NEWLINE# users . append ( user ) #NEWLINE# #UNINDENT# self . session . add_all ( users ) #NEWLINE# self . session . commit ( )