Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_middleware: Remove help related tests.

Shubham Padia075809b93ebe
diff --git a/zerver/tests/test_middleware.py b/zerver/tests/test_middleware.py
index 5b6ab8cf4e2..cbc36ac4006 100644
--- a/zerver/tests/test_middleware.py
+++ b/zerver/tests/test_middleware.py
@@ -84,57 +84,7 @@ class OpenGraphTest(ZulipTestCase):
for substring in not_in_description:
self.assertNotIn(substring, open_graph_description)
- def test_admonition_and_link(self) -> None:
- # restrict-wildcard-mentions starts with an {!admin-only.md!},
- # and has a link in the first paragraph.
- self.check_title_and_description(
- "/help/restrict-wildcard-mentions",
- "Restrict wildcard mentions | Zulip help center",
- [
- "Organization administrators can configure who is allowed to use wildcard mentions ",
- "more than 15 participants. | This permission can be granted to any combination of roles, ",
- ],
- [
- "Restrict wildcard mentions",
- "feature is only available",
- "Related articles",
- "DMs, mentions, and alerts",
- ],
- )
-
- def test_settings_tab(self) -> None:
- # deactivate-your-account starts with {settings_tab|account-and-privacy}
- self.check_title_and_description(
- "/help/deactivate-your-account",
- "Deactivate your account | Zulip help center",
- [
- "Deactivating your Zulip account in one organization will have no effect "
- "on any other Zulip accounts you may have. | Once you deactivate your account"
- ],
- ["Approve by clicking", " ", "\n"],
- )
-
- def test_tabs(self) -> None:
- # logging-out starts with {start_tabs}
- self.check_title_and_description(
- "/help/logging-out",
- "Logging out | Zulip help center",
- # Ideally we'd do something better here
- [
- "Your feedback helps us make Zulip better for everyone! Please contact us with"
- " questions, suggestions, and feature requests."
- ],
- ["Click on the gear"],
- )
-
def test_index_pages(self) -> None:
- self.check_title_and_description(
- "/help/",
- "Zulip help center",
- ["Welcome to the Zulip"],
- [],
- )
-
self.check_title_and_description(
"/api/",
"Zulip API documentation",
@@ -144,14 +94,16 @@ class OpenGraphTest(ZulipTestCase):
"guide should help you find the API you need:"
)
],
- [],
+ # This is added to maintain coverage for the not_in_description
+ # block since we might want to keep using that for future tests.
+ ["No such article."],
)
def test_nonexistent_page(self) -> None:
self.check_title_and_description(
- "/help/not-a-real-page",
+ "/api/not-a-real-page",
# Probably we should make this "Zulip Help Center"
- "No such article. | Zulip help center",
+ "No such article. | Zulip API documentation",
[
"No such article.",
"Your feedback helps us make Zulip better for everyone! Please contact us",