#NEWLINE# def test_view_raises_http_error( ) : #NEWLINE# #INDENT# class app ( morepath . App ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# dectate . commit ( app ) #NEWLINE# def view( self , request ) : #NEWLINE# #INDENT# raise HTTPBadRequest ( ) #NEWLINE# #UNINDENT# path_registry = app . config . path_registry #NEWLINE# path_registry . register_path ( Model , 'foo' , None , None , None , None , False , Model ) #NEWLINE# app . config . view_registry . register_view ( dict ( model = Model ) , view ) #NEWLINE# request = app ( ) . request ( get_environ ( path = 'foo' ) ) #NEWLINE# with pytest . raises ( HTTPBadRequest ) : #NEWLINE# #INDENT# publish ( request )