transaction_tests: Remove testing URL.

Rewrite the test so that we don't have a dedicated URL for testing.
dev_update_subgroups is called directly from the tests without using the
test client.
This commit is contained in:
Zixuan James Li
2023-09-01 12:14:21 -10:00
committed by Tim Abbott
parent 81bd63cb46
commit 1e1f98edb2
3 changed files with 63 additions and 92 deletions

View File

@@ -10,7 +10,6 @@ from django.urls import path
from django.views.generic import TemplateView
from django.views.static import serve
from zerver.lib.rest import rest_path
from zerver.views.auth import config_error, login_page
from zerver.views.development.cache import remove_caches
from zerver.views.development.camo import handle_camo_url
@@ -32,7 +31,6 @@ from zerver.views.development.registration import (
register_development_realm,
register_development_user,
)
from zerver.views.development.user_groups import dev_update_subgroups
# These URLs are available only in the development environment
@@ -100,14 +98,6 @@ urls = [
path("external_content/<digest>/<received_url>", handle_camo_url),
]
testing_urls = [
rest_path(
"testing/user_groups/<int:user_group_id>/subgroups",
POST=(dev_update_subgroups, {"intentionally_undocumented"}),
),
]
urls += testing_urls
v1_api_mobile_patterns = [
# This is for the signing in through the devAuthBackEnd on mobile apps.
path("dev_fetch_api_key", api_dev_fetch_api_key),