From 060754980cef58b25ed19f2ae5f63a4e0d1ef86d Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 18 Jul 2024 14:08:57 +0000 Subject: [PATCH] tests: INLINE_IMAGE_PREVIEW=True is already the default. --- zerver/tests/test_markdown.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/zerver/tests/test_markdown.py b/zerver/tests/test_markdown.py index 9351711eff..391488e603 100644 --- a/zerver/tests/test_markdown.py +++ b/zerver/tests/test_markdown.py @@ -664,7 +664,7 @@ class MarkdownTest(ZulipTestCase): '

https://vimeo.com/246979354

', ) - @override_settings(THUMBNAIL_IMAGES=True, INLINE_IMAGE_PREVIEW=True) + @override_settings(THUMBNAIL_IMAGES=True) def test_inline_image_thumbnail_url(self) -> None: realm = get_realm("zephyr") msg = "[foobar](/user_uploads/{realm_id}/50/w2G6ok9kr8AMCQCTNAUOFMln/IMG_0677.JPG)" @@ -704,7 +704,7 @@ class MarkdownTest(ZulipTestCase): converted = markdown_convert_wrapper(msg) self.assertIn(thumbnail_img, converted) - @override_settings(THUMBNAIL_IMAGES=True, INLINE_IMAGE_PREVIEW=True) + @override_settings(THUMBNAIL_IMAGES=True) def test_inline_image_preview(self) -> None: with_preview = '
' without_preview = '

http://cdn.wallpapersafari.com/13/6/16eVjx.jpeg

' @@ -762,7 +762,6 @@ class MarkdownTest(ZulipTestCase): converted = markdown_convert_wrapper(content) self.assertIn(converted, thumbnail_img) - @override_settings(INLINE_IMAGE_PREVIEW=True) def test_max_inline_preview(self) -> None: image_links = [ # Add a youtube link within a spoiler to ensure other link types are counted @@ -795,7 +794,7 @@ class MarkdownTest(ZulipTestCase): soup = BeautifulSoup(converted, "html.parser") self.assert_length(soup(class_="message_inline_image"), 0) - @override_settings(THUMBNAIL_IMAGES=True, INLINE_IMAGE_PREVIEW=True) + @override_settings(THUMBNAIL_IMAGES=True) def test_inline_image_quoted_blocks(self) -> None: content = "http://cdn.wallpapersafari.com/13/6/16eVjx.jpeg" expected = '
' @@ -830,7 +829,7 @@ class MarkdownTest(ZulipTestCase): converted = render_message_markdown(msg, content) self.assertEqual(converted.rendered_content, expected) - @override_settings(THUMBNAIL_IMAGES=True, INLINE_IMAGE_PREVIEW=True) + @override_settings(THUMBNAIL_IMAGES=True) def test_inline_image_preview_order(self) -> None: realm = get_realm("zulip") content = "http://imaging.nikon.com/lineup/dslr/df/img/sample/img_01.jpg\nhttp://imaging.nikon.com/lineup/dslr/df/img/sample/img_02.jpg\nhttp://imaging.nikon.com/lineup/dslr/df/img/sample/img_03.jpg" @@ -870,7 +869,7 @@ class MarkdownTest(ZulipTestCase): converted = render_message_markdown(msg, content) self.assertEqual(converted.rendered_content, expected) - @override_settings(THUMBNAIL_IMAGES=True, INLINE_IMAGE_PREVIEW=True) + @override_settings(THUMBNAIL_IMAGES=True) def test_corrected_image_source(self) -> None: # testing only Wikipedia because linx.li URLs can be expected to expire content = "https://en.wikipedia.org/wiki/File:Wright_of_Derby,_The_Orrery.jpg"