def test_get_object(self, user: User, rf: RequestFactory): view = UserUpdateView() request = rf.get("/fake-url/") request.user = user view.request = request assert view.get_object() == user
def test_get_object(self, user: settings.AUTH_USER_MODEL, request_factory: RequestFactory): view = UserUpdateView() request = request_factory.get("/fake-url/") request.user = user view.request = request assert view.get_object() == user