From 0253569a8c976ccd9f5b1cc998a5e5bed43d1d6b Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Thu, 19 Dec 2024 17:03:37 +0000 Subject: [PATCH] Remove system check that MAILROOM_URL is set --- temba/flows/__init__.py | 1 - temba/flows/checks.py | 14 -------------- temba/flows/tests/test_misc.py | 12 ------------ 3 files changed, 27 deletions(-) delete mode 100644 temba/flows/checks.py diff --git a/temba/flows/__init__.py b/temba/flows/__init__.py index 09c4bf668ec..e69de29bb2d 100644 --- a/temba/flows/__init__.py +++ b/temba/flows/__init__.py @@ -1 +0,0 @@ -from .checks import * # noqa diff --git a/temba/flows/checks.py b/temba/flows/checks.py deleted file mode 100644 index 85e0a6169b5..00000000000 --- a/temba/flows/checks.py +++ /dev/null @@ -1,14 +0,0 @@ -from django.conf import settings -from django.core.checks import Warning, register - - -@register() -def mailroom_url(app_configs, **kwargs): - if not settings.MAILROOM_URL: - return [ - Warning( - "No mailroom URL set, simulation will not be available", - hint="Set MAILROOM_URL in your Django settings.", - ) - ] - return [] diff --git a/temba/flows/tests/test_misc.py b/temba/flows/tests/test_misc.py index ebccab1432a..6e227d2b5ed 100644 --- a/temba/flows/tests/test_misc.py +++ b/temba/flows/tests/test_misc.py @@ -1,6 +1,3 @@ -from django.test.utils import override_settings - -from temba.flows.checks import mailroom_url from temba.tests import TembaTest @@ -11,12 +8,3 @@ def test_languages(self): self.assertEqual( response.json(), {"results": [{"iso": "eng", "name": "English"}, {"iso": "kin", "name": "Kinyarwanda"}]} ) - - -class SystemChecksTest(TembaTest): - def test_mailroom_url(self): - with override_settings(MAILROOM_URL="http://mailroom.io"): - self.assertEqual(len(mailroom_url(None)), 0) - - with override_settings(MAILROOM_URL=None): - self.assertEqual(mailroom_url(None)[0].msg, "No mailroom URL set, simulation will not be available")