Hi,

I have the following URL dispatch setup --

<__init__.py>
config.add_route('user', '/user')
config.add_route('user_id', '/user/{user_id}')
config.scan()
</__init.py__>

<views/user.py>
@view_config(route_name='user', renderer='user.genshi')
@view_config(route_name='user_id', renderer='user_id.genshi')
def user_view(request):
</views/user.py>

which works fine.

However, my unit test case always gets routed to 'user' instead of
'user_id' no matter how I tweak the request.path_info --

<test_user_view.py>
request = DummyRequest()
request.path_info = route_url('user_id', request, user_id=u'42')
#request.path_info = '/user/42'
resp = views.user.user_view(request)
</test_user_view.py>

I'm sure I must be missing something very simple there.

Thanks in advance!

Jerry

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to