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_docs: Add assertion check.

Zixuan James Li07eccbde97e1
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
index 020f5c5c46b..c510644ee3f 100644
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -91,6 +91,7 @@ class Integration:
self.categories = list(map((lambda c: CATEGORIES[c]), categories))
self.logo_path = logo if logo is not None else self.get_logo_path()
+ # TODO: Enforce that all integrations have logo_url with an assertion.
self.logo_url = self.get_logo_url()
if display_name is None:
diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py
index 72571bf4fad..21a3b5fa622 100644
--- a/zerver/tests/test_docs.py
+++ b/zerver/tests/test_docs.py
@@ -320,6 +320,7 @@ class HelpTest(ZulipTestCase):
class IntegrationTest(ZulipTestCase):
def test_check_if_every_integration_has_logo_that_exists(self) -> None:
for integration in INTEGRATIONS.values():
+ assert integration.logo_url is not None
path = urlsplit(integration.logo_url).path
self.assertTrue(os.path.isfile(settings.DEPLOY_ROOT + path), integration.name)