From fd2e7ca363d61d295ebf1d5d4a63f8c53952fa0a Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Thu, 16 May 2019 16:34:18 -0400 Subject: [PATCH] Factor out reloading of settings module --- app/server/tests/test_config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/server/tests/test_config.py b/app/server/tests/test_config.py index 8cace2e6..14a68071 100644 --- a/app/server/tests/test_config.py +++ b/app/server/tests/test_config.py @@ -29,12 +29,10 @@ class TestDatabaseUrl(TestCase): self._assert_user_is('user@host') def _assert_sslmode_is(self, expected): - reload(settings) actual = settings.DATABASES['default'].get('OPTIONS', {}).get('sslmode') self.assertEqual(actual, expected) def _assert_user_is(self, expected): - reload(settings) actual = settings.DATABASES['default'].get('USER', '') self.assertEqual(actual, expected) @@ -42,6 +40,7 @@ class TestDatabaseUrl(TestCase): @contextmanager def setenv(key, value): environ[key] = value + reload(settings) yield del environ[key]