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.
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.
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.