From 6143cb6e73a9092a1878a5bc9d07f862a16aab17 Mon Sep 17 00:00:00 2001 From: akshatdalton Date: Mon, 31 May 2021 18:48:48 +0000 Subject: [PATCH] test_markdown: Use assertTrue/assertFalse instead of assertEqual. --- zerver/tests/test_markdown.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/zerver/tests/test_markdown.py b/zerver/tests/test_markdown.py index 841232b8f4..4c3f561c3e 100644 --- a/zerver/tests/test_markdown.py +++ b/zerver/tests/test_markdown.py @@ -711,7 +711,7 @@ class MarkdownTest(ZulipTestCase): @override_settings(INLINE_IMAGE_PREVIEW=False) def test_image_preview_enabled(self) -> None: ret = image_preview_enabled() - self.assertEqual(ret, False) + self.assertFalse(ret) settings.INLINE_IMAGE_PREVIEW = True @@ -720,22 +720,22 @@ class MarkdownTest(ZulipTestCase): realm = message.get_realm() ret = image_preview_enabled() - self.assertEqual(ret, True) + self.assertTrue(ret) ret = image_preview_enabled(no_previews=True) - self.assertEqual(ret, False) + self.assertFalse(ret) ret = image_preview_enabled(message, realm) - self.assertEqual(ret, True) + self.assertTrue(ret) ret = image_preview_enabled(message) - self.assertEqual(ret, True) + self.assertTrue(ret) ret = image_preview_enabled(message, realm, no_previews=True) - self.assertEqual(ret, False) + self.assertFalse(ret) ret = image_preview_enabled(message, no_previews=True) - self.assertEqual(ret, False) + self.assertFalse(ret) @override_settings(INLINE_URL_EMBED_PREVIEW=False) def test_url_embed_preview_enabled(self) -> None: @@ -748,23 +748,23 @@ class MarkdownTest(ZulipTestCase): realm.save(update_fields=["inline_url_embed_preview"]) ret = url_embed_preview_enabled() - self.assertEqual(ret, False) + self.assertFalse(ret) settings.INLINE_URL_EMBED_PREVIEW = True ret = url_embed_preview_enabled() - self.assertEqual(ret, True) + self.assertTrue(ret) ret = image_preview_enabled(no_previews=True) - self.assertEqual(ret, False) + self.assertFalse(ret) ret = url_embed_preview_enabled(message, realm) - self.assertEqual(ret, True) + self.assertTrue(ret) ret = url_embed_preview_enabled(message) - self.assertEqual(ret, True) + self.assertTrue(ret) ret = url_embed_preview_enabled(message, no_previews=True) - self.assertEqual(ret, False) + self.assertFalse(ret) def test_inline_dropbox(self) -> None: msg = "Look at how hilarious our old office was: https://www.dropbox.com/s/ymdijjcg67hv2ta/IMG_0923.JPG"