Fixed #24055 -- Keep reference to view class for resolve()

https://code.djangoproject.com/ticket/24055
Same as above (use `assertIs` instead).