#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# mocker = requests_mock . Mocker ( ) #NEWLINE# mocker . post ( 'https://api.weibo.com/oauth2/access_token' , json = { #NEWLINE# #INDENT# 'access_token' : 'weibo' , #NEWLINE# #UNINDENT# } ) #NEWLINE# mocker . start ( ) #NEWLINE# self . addCleanup ( mocker . stop ) #NEWLINE# weibo = OAuth2Session ( 'foo' , redirect_uri = 'https://i.b' ) #NEWLINE# self . session = weibo_compliance_fix ( mocker )