#NEWLINE# def test_traject_consume_factory_returns_none( ) : #NEWLINE# #INDENT# class app ( morepath . App ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# dectate . commit ( app ) #NEWLINE# traject = app . config . path_registry #NEWLINE# def get_model( ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# traject . add_pattern ( 'sub' , ( get_model , paramfac ) ) #NEWLINE# ( found , request ) = consume ( app ( ) , 'sub' ) #NEWLINE# assert ( found is None ) #NEWLINE# assert ( found . unconsumed == [ 'sub' ] )