#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . app = create_app ( 'test' ) #NEWLINE# self . app_context = self . app . app_context ( ) #NEWLINE# self . client = self . app . test_client ( ) #NEWLINE# self . app_context . push ( ) #NEWLINE# db . create_all ( ) #NEWLINE# Role . insert_roles ( ) #NEWLINE# u = User ( email = self . app . config [ 'FLASKY_ADMIN' ] , password = 'testpass' , name = 'Admin' ) #NEWLINE# u2 = User ( email = 'test2@example.com' , password = 'testpass' , name = 'Test User 2' , status = True ) #NEWLINE# u3 = User ( email = 'test3@example.com' , password = 'testpass' , name = 'Test User 3' , status = True ) #NEWLINE# db . session . add_all ( [ u , u2 , u3 ] ) #NEWLINE# db . session . commit ( )