#NEWLINE# def test_anonymous( self ) : #NEWLINE# #INDENT# class SimpleConv ( Converter ) : #NEWLINE# #INDENT# regex = '.+' #NEWLINE# #UNINDENT# convs = { #NEWLINE# #INDENT# 'string' : SimpleConv , #NEWLINE# #UNINDENT# } #NEWLINE# ut = UrlTemplate ( '/simple/<id>' ) #NEWLINE# regexp = construct_re ( ut . template , converters = convs , anonymous = True ) [ 0 ] #NEWLINE# self . assertEqual ( regexp . pattern , '^\\/simple\\/.+' ) #NEWLINE# regexp = construct_re ( ut . template , converters = convs , anonymous = False ) [ 0 ] #NEWLINE# self . assertEqual ( regexp . pattern , '^\\/simple\\/(?P<id>.+)' )