#NEWLINE# def test_it_sets_bad_request_status_code( self ) : #NEWLINE# #INDENT# request = testing . DummyRequest ( ) #NEWLINE# exc = mock . Mock ( message = 'it exploded' ) #NEWLINE# views . error_validation ( exc , request ) #NEWLINE# assert ( request . response . status_code == 400 )