Browse Source

Factor out reloading of settings module

pull/206/head
Clemens Wolff 5 years ago
parent
commit
fd2e7ca363
1 changed files with 1 additions and 2 deletions
  1. 3
      app/server/tests/test_config.py

3
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]
Loading…
Cancel
Save