#NEWLINE# def test_it_sets_status_code_from_error( self ) : #NEWLINE# #INDENT# request = testing . DummyRequest ( ) #NEWLINE# exc = views . APIError ( 'it exploded' , status_code = 429 ) #NEWLINE# views . error_api ( exc , request ) #NEWLINE# assert ( request . response . status_code == 429 )