#NEWLINE# def test_access_symbol( self ) : #NEWLINE# #INDENT# t = sqlparse . parse ( 'select a.[foo bar] as foo' ) [ 0 ] . tokens #NEWLINE# self . assert_ ( isinstance ( t [ ( - 1 ) ] , sqlparse . sql . Identifier ) ) #NEWLINE# self . assertEqual ( t [ ( - 1 ) ] . get_name ( ) , 'foo' ) #NEWLINE# self . assertEqual ( t [ ( - 1 ) ] . get_real_name ( ) , '[foo bar]' ) #NEWLINE# self . assertEqual ( t [ ( - 1 ) ] . get_parent_name ( ) , 'a' )