#NEWLINE# def test_sqla_model_repr( app , db , request ) : #NEWLINE# #INDENT# class MyAwesomeOAuth ( db . Model , OAuthConsumerMixin ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# db . create_all ( ) #NEWLINE# def done( ) : #NEWLINE# #INDENT# db . session . remove ( ) #NEWLINE# db . drop_all ( ) #NEWLINE# #UNINDENT# request . addfinalizer ( done ) #NEWLINE# o = MyAwesomeOAuth ( ) #NEWLINE# assert ( 'MyAwesomeOAuth' in repr ( o ) ) #NEWLINE# o . provider = 'supercool' #NEWLINE# assert ( 'provider="supercool"' in repr ( db ) ) #NEWLINE# o . token = { #NEWLINE# #INDENT# 'access_token' : 'secret' , #NEWLINE# #UNINDENT# } #NEWLINE# assert ( 'secret' not in repr ( o ) ) #NEWLINE# db . session . add ( o ) #NEWLINE# db . session . commit ( ) #NEWLINE# assert ( 'id=' in repr ( o ) ) #NEWLINE# assert ( 'secret' not in repr ( o ) )