def METHOD_NAME(self):
    request = self.request
    user = self.user
    user.session_nonce = "xxx"
    with assume_test_silo_mode(SiloMode.CONTROL):
        user.save()
        assert login(request, user)
    self.middleware.process_request(request)
    assert request.user.is_authenticated
    self.assert_user_equals(request)
    assert request.session["_nonce"] == "xxx"