#NEWLINE# def test_post_form_with_request_token_failing_oauth( self ) : #NEWLINE# #INDENT# 'Ensure POSTing with unauthorized request token instead of access token fails' #NEWLINE# self . token . token_type = self . token . REQUEST #NEWLINE# self . token . save ( ) #NEWLINE# auth = self . _create_authorization_header ( ) #NEWLINE# response = self . csrf_client . post ( '/oauth/' , { #NEWLINE# #INDENT# 'example' : 'example' , #NEWLINE# #UNINDENT# } , HTTP_AUTHORIZATION = auth ) #NEWLINE# self . assertIn ( response . status_code , ( status . HTTP_401_UNAUTHORIZED , status . HTTP_403_FORBIDDEN ) )