#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . app = create_app ( 'test' ) #NEWLINE# self . app . config [ 'CSRF_ENABLED' ] = False #NEWLINE# self . client = self . app . test_client ( ) #NEWLINE# self . app_context = self . app . app_context ( ) #NEWLINE# self . app_context . push ( ) #NEWLINE# db . create_all ( ) #NEWLINE# Role . insert_roles ( ) #NEWLINE# role = Role . query . filter_by ( name = 'user' ) . first ( ) #NEWLINE# user = User ( name = 'Test User' , email = 'test@mail.com' , password = 'testpass' , status = True , role = role ) #NEWLINE# db . session . add ( user ) #NEWLINE# db . session . commit ( )