revsys / django-test-plus

Useful additions to Django's default TestCase

Home Page:https://django-test-plus.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`assertGoodView` seems to expect an `url_name` as param but it never reverses it

nessita opened this issue · comments

The current signature of assertGoodView looks like this:

    def assertGoodView(self, url_name, *args, **kwargs):

but the implementation never reverses the url_name param so a valid url name results in a 404 instead of a 400.

OTOH, assertLoginRequired has this signature:

    def assertLoginRequired(self, url, *args, **kwargs):

but it forcibly calls reverse on URL, which fails if you pass the resolved url! 😕