def test_get_redirect_url(self, user: User, rf: RequestFactory): view = UserRedirectView() request = rf.get("/fake-url") request.user = user view.request = request assert view.get_redirect_url() == f"/users/{user.username}/"
def test_get_redirect_url(self, user: settings.AUTH_USER_MODEL, request_factory: RequestFactory): view = UserRedirectView() request = request_factory.get("/fake-url") request.user = user view.request = request assert view.get_redirect_url() == f"/users/{user.username}/"