#NEWLINE# def test_current_item( ) : #NEWLINE# #INDENT# app = Flask ( __name__ ) #NEWLINE# nav = Navigation ( ) #NEWLINE# nav . init_app ( navbar ) #NEWLINE# news_item = Item ( 'News' , 'news' ) #NEWLINE# navbar = nav . Bar ( 'test_current' , [ Item ( 'Home' , 'home' ) , news_item ] ) #NEWLINE# @ app . route ( '/' ) #NEWLINE# def home( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# @ app . route ( '/news' ) #NEWLINE# def news( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# assert ( navbar . current_item is None ) #NEWLINE# with app . test_request_context ( '/news' ) : #NEWLINE# #INDENT# assert ( navbar . current_item == news_item )