From f90f701f033357cd94f33c947140e4baef522a4e Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Fri, 26 Oct 2018 03:14:54 +0530 Subject: [PATCH] camo: Change CAMO_URI setting value for test suite. This is a preparatory commit which will help us with removing camo. In the upcoming commits we introduce a new endpoint which is based out on the setting CAMO_URI. Since camo could have been hosted on a different server as well from the main Zulip server, this change will help us realise in tests how that scenerio might be dealt with. --- zerver/tests/test_bugdown.py | 2 +- zerver/tests/test_thumbnail.py | 2 +- zproject/test_settings.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zerver/tests/test_bugdown.py b/zerver/tests/test_bugdown.py index c3ce018a08..87b195a1b4 100644 --- a/zerver/tests/test_bugdown.py +++ b/zerver/tests/test_bugdown.py @@ -556,7 +556,7 @@ class BugdownTest(ZulipTestCase): '
' '' '' '' diff --git a/zerver/tests/test_thumbnail.py b/zerver/tests/test_thumbnail.py index 0f5671d4f8..a06378e6a6 100644 --- a/zerver/tests/test_thumbnail.py +++ b/zerver/tests/test_thumbnail.py @@ -284,7 +284,7 @@ class ThumbnailTest(ZulipTestCase): with self.settings(THUMBOR_URL=''): result = self.client_get("/thumbnail?url=%s&size=full" % (quoted_uri)) self.assertEqual(result.status_code, 302, result) - base = 'https://external-content.zulipcdn.net/7b6552b60c635e41e8f6daeb36d88afc4eabde79/687474703a2f2f7777772e676f6f676c652e636f6d2f696d616765732f737270722f6c6f676f34772e706e67' + base = 'https://external-content.zulipcdn.net/external_content/7b6552b60c635e41e8f6daeb36d88afc4eabde79/687474703a2f2f7777772e676f6f676c652e636f6d2f696d616765732f737270722f6c6f676f34772e706e67' self.assertEqual(base, result.url) def test_with_different_THUMBOR_URL(self) -> None: diff --git a/zproject/test_settings.py b/zproject/test_settings.py index 5c25f9e962..71164759ee 100644 --- a/zproject/test_settings.py +++ b/zproject/test_settings.py @@ -41,7 +41,7 @@ if "TORNADO_SERVER" in os.environ: else: # This covers the backend test suite case TORNADO_SERVER = None - CAMO_URI = 'https://external-content.zulipcdn.net/' + CAMO_URI = 'https://external-content.zulipcdn.net/external_content/' CAMO_KEY = 'dummy' if "CASPER_TESTS" in os.environ: