      def test_default_logout_then_login_get(self):
          self.login()
          req = HttpRequest()
          req.method = "GET"
          req.session = self.client.session
          response = logout_then_login(req)
          # RemovedInDjango50Warning: When the deprecation ends, replace with
          #   self.assertEqual(response.status_code, 405)
 
</s> remove         self.assertRedirects(response, "/logout/", fetch_redirect_response=False)
 </s> add         self.assertContains(response, "Logged out")
        self.confirm_logged_out() </s> remove         if redirect_to:
            # Redirect to this page until the session has been cleared.
 </s> add         if redirect_to != request.get_full_path():
            # Redirect to target page once the session has been cleared. </s> remove         """Return the default redirect URL, or None if no URL is configured."""
 </s> add         """Return the default redirect URL."""
        req.META["SERVER_NAME"] = "testserver"
        req.META["SERVER_PORT"] = 80
      def test_default_logout_then_login_get(self):
          self.login()
          req = HttpRequest()
          req.method = "GET"
        req.META["SERVER_NAME"] = "testserver"
        req.META["SERVER_PORT"] = 80
          req.session = self.client.session
          response = logout_then_login(req)
          # RemovedInDjango50Warning: When the deprecation ends, replace with
          #   self.assertEqual(response.status_code, 405)
keep keep keep add keep keep keep keep
 Simplified LogoutView.get_success_url().

This preserves the behavior of redirecting to the logout URL without
query string parameters when an insecure ?next=... parameter is given.

It changes the behavior of a POST to the logout URL, as shown by the
test that is changed. Currently, this results in a GET to the logout
URL. However, such GET requests are deprecated. This change would be
necessary in Django 5.0 anyway. This commit merely anticipates it. 
tests/auth_tests/test_views.py