From 68726052d58c3457cff3483f8f06560711494c38 Mon Sep 17 00:00:00 2001 From: David Burke Date: Tue, 23 Jan 2024 12:02:20 -0500 Subject: [PATCH] test_site_name overrides KOBOCAT_PUBLIC_HOSTNAME in case it was changed from it's default setting --- onadata/apps/main/tests/test_custom_context_processors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onadata/apps/main/tests/test_custom_context_processors.py b/onadata/apps/main/tests/test_custom_context_processors.py index 1545d13d7..4b4a3925b 100644 --- a/onadata/apps/main/tests/test_custom_context_processors.py +++ b/onadata/apps/main/tests/test_custom_context_processors.py @@ -1,9 +1,10 @@ # coding: utf-8 -from django.test import TestCase +from django.test import override_settings, TestCase from onadata.apps.main.context_processors import site_name class CustomContextProcessorsTest(TestCase): + @override_settings(KOBOCAT_PUBLIC_HOSTNAME="kc.kobotoolbox.org") def test_site_name(self): context = site_name(None) self.assertEqual(context, {'SITE_NAME': 'kc.kobotoolbox.org'})