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.
This commit is contained in:
Aditya Bansal 2018-10-26 03:14:54 +05:30 committed by Tim Abbott
parent 86eeae6faa
commit f90f701f03
3 changed files with 3 additions and 3 deletions

View File

@ -556,7 +556,7 @@ class BugdownTest(ZulipTestCase):
'<div class="twitter-tweet">'
'<a href="%s" target="_blank">'
'<img class="twitter-avatar"'
' src="https://external-content.zulipcdn.net/1f7cd2436976d410eab8189ebceda87ae0b34ead/687474703a2f2f7062732e7477696d672e63'
' src="https://external-content.zulipcdn.net/external_content/1f7cd2436976d410eab8189ebceda87ae0b34ead/687474703a2f2f7062732e7477696d672e63'
'6f6d2f70726f66696c655f696d616765732f313338303931323137332f53637265656e5f73686f745f323031312d30362d30335f61745f372e33352e33'
'365f504d5f6e6f726d616c2e706e67">'
'</a>'

View File

@ -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:

View File

@ -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: