#NEWLINE# def test_bad_request( self ) : #NEWLINE# #INDENT# gw = django . DjangoGateway ( ) #NEWLINE# request = util . BufferedByteStream ( ) #NEWLINE# request . write ( 'Bad request' ) #NEWLINE# request . seek ( 0 , 0 ) #NEWLINE# http_request = http . HttpRequest ( ) #NEWLINE# http_request . method = 'POST' #NEWLINE# http_request . raw_post_data = request . getvalue ( ) #NEWLINE# http_response = gw ( http_request ) #NEWLINE# self . assertEqual ( gw . status_code , 400 )