From 51d0f691d9ad620e5846eedac4108f723886c96f Mon Sep 17 00:00:00 2001 From: Roger Gammans Date: Thu, 18 Feb 2021 19:35:31 +0000 Subject: [PATCH] Improve testing by adding a test for issue 147 --- martor/tests/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/martor/tests/tests.py b/martor/tests/tests.py index ebb5d69fc..732fb06ea 100644 --- a/martor/tests/tests.py +++ b/martor/tests/tests.py @@ -7,3 +7,14 @@ class SimpleTest(TestCase): def test_me(self): response = self.client.get('/test-form-view/') self.assertEqual(response.status_code, 200) + + def test_markdownify_error(self,): + from martor.utils import markdownify, VersionNotCompatible + ## This tests that real errors don't raise VersionNotCompatible + # errors, which could be misleading. + try: + markdownify(None) + except Exception as e: + self.assertNotIsInstance(e,VersionNotCompatible) + else: + self.fail("no assertion raised")