#NEWLINE# def test_default_session_scoping( self ) : #NEWLINE# #INDENT# app = flask . Flask ( __name__ ) #NEWLINE# app . config [ 'TESTING' ] = True #NEWLINE# db = fsa . SQLAlchemy ( app ) #NEWLINE# class FOOBar ( db . Model ) : #NEWLINE# #INDENT# id = db . Column ( db . Integer , primary_key = True ) #NEWLINE# #UNINDENT# db . create_all ( ) #NEWLINE# with app . test_request_context ( ) : #NEWLINE# #INDENT# fb = FOOBar ( ) #NEWLINE# db . session . add ( self ) #NEWLINE# assert ( fb in db . session )