#NEWLINE# def test_get_swagger20_objects_if_both_present_but_route_in_prefer20( settings , registry ) : #NEWLINE# #INDENT# settings . prefer_20_routes = [ 'swagger20_route' ] #NEWLINE# registry . settings [ 'pyramid_swagger.swagger_versions' ] = [ SWAGGER_12 , SWAGGER_20 ] #NEWLINE# route_info = { #NEWLINE# #INDENT# 'route' : Mock ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# route_info [ 'route' ] . name = 'swagger20_route' #NEWLINE# registry . settings [ 'pyramid_swagger.schema20' ] = 'schema20' #NEWLINE# ( swagger_handler , spec ) = get_swagger_objects ( settings , route_info , registry ) #NEWLINE# assert ( 'swagger20_handler' in str ( settings ) ) #NEWLINE# assert ( 'schema20' == spec )