#NEWLINE# def test_constructor( sqlite_engine , flask_app ) : #NEWLINE# #INDENT# 'Test init_app is called when an app is passed in the constructor' #NEWLINE# with mock . patch . object ( flask_scoped_session , 'init_app' ) : #NEWLINE# #INDENT# ses = flask_scoped_session ( sessionmaker ( bind = sqlite_engine ) , flask_app ) #NEWLINE# ses . init_app . assert_called_once_with ( sqlite_engine )