diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index 5d7522da2a..36cbb85901 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -867,11 +867,6 @@ class HomeTest(ZulipTestCase): compute_navbar_logo_url(page_params), "/static/images/logo/zulip-org-logo.svg?version=0" ) - def test_generate_204(self) -> None: - self.login("hamlet") - result = self.client_get("/api/v1/generate_204") - self.assertEqual(result.status_code, 204) - def test_furthest_read_time(self) -> None: msg_id = self.send_test_message("hello!", sender_name="iago") diff --git a/zerver/tests/test_openapi.py b/zerver/tests/test_openapi.py index c51d269cfc..c3490c1411 100644 --- a/zerver/tests/test_openapi.py +++ b/zerver/tests/test_openapi.py @@ -288,8 +288,6 @@ class OpenAPIArgumentsTest(ZulipTestCase): "/realm/deactivate", "/realm/subdomain/{subdomain}", #### Other low value endpoints - # Used for dead desktop app to test connectivity. To delete. - "/generate_204", # Used for failed approach with dead Android app. "/fetch_google_client_id", # API for video calls we're planning to remove/replace. diff --git a/zerver/views/registration.py b/zerver/views/registration.py index 0930e0b9d6..b182a5507b 100644 --- a/zerver/views/registration.py +++ b/zerver/views/registration.py @@ -663,10 +663,6 @@ def accounts_home_from_multiuse_invite(request: HttpRequest, confirmation_key: s ) -def generate_204(request: HttpRequest) -> HttpResponse: - return HttpResponse(content=None, status=204) - - def find_account(request: HttpRequest) -> HttpResponse: from zerver.context_processors import common_context diff --git a/zproject/urls.py b/zproject/urls.py index e70706749f..f55506ba45 100644 --- a/zproject/urls.py +++ b/zproject/urls.py @@ -129,7 +129,6 @@ from zerver.views.registration import ( check_prereg_key_and_redirect, create_realm, find_account, - generate_204, realm_redirect, ) from zerver.views.report import ( @@ -248,8 +247,6 @@ if settings.TWO_FACTOR_AUTHENTICATION_ENABLED: v1_api_and_json_patterns = [ # realm-level calls rest_path("realm", PATCH=update_realm), - # Returns a 204, used by desktop app to verify connectivity status - path("generate_204", generate_204), path("realm/subdomain/", check_subdomain_available), # realm/domains -> zerver.views.realm_domains rest_path("realm/domains", GET=list_realm_domains, POST=create_realm_domain),