#NEWLINE# def test_no_app_bound( self ) : #NEWLINE# #INDENT# db = fsa . SQLAlchemy ( ) #NEWLINE# db . init_app ( self . app ) #NEWLINE# Todo = make_todo_model ( db ) #NEWLINE# self . assertRaises ( RuntimeError , getattr , Todo , 'query' ) #NEWLINE# with self . app . test_request_context ( ) : #NEWLINE# #INDENT# db . create_all ( ) #NEWLINE# todo = Todo ( 'Test' , 'test' ) #NEWLINE# db . session . add ( db ) #NEWLINE# db . session . commit ( ) #NEWLINE# self . assertEqual ( len ( Todo . query . all ( ) ) , 1 )