tags:

views:

11

answers:

1

Hi,

In writing unit tests for Django, how would I test whether a particular view was used in rendering a URL? I was hoping there would exist TestCase.assertViewUsed, but I can't see it.

Thanks.

+1  A: 

You can try to use django.core.urlresolvers.reverse to create an url from view. This way you will see, whether view is mapped properly to an address.

gruszczy