From 853d56522c97c311c45b1f77155cd25348a2002e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 Dec 2017 15:41:06 +0000 Subject: [PATCH] futher tests --- test/test_django_heroku.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/test_django_heroku.py b/test/test_django_heroku.py index e7243c7..a2d1d86 100644 --- a/test/test_django_heroku.py +++ b/test/test_django_heroku.py @@ -11,17 +11,23 @@ def test_databases(): imp.reload(config) assert 'postgres' in config.DATABASES['default']['ENGINE'] - -def test_multi_databases(): - os.environ - imp.reload(config) def test_test_runner(): + # Mock CI environment. + os.environ['CI'] = '1' imp.reload(config) + assert 'heroku' in config.TEST_RUNNER.lower() + + # Cleanup environment for further tests. + del os.environ['CI'] + def test_staticfiles(): imp.reload(config) + assert config.STATIC_URL == '/static/' + assert 'whitenoise' in config.MIDDLEWARE[0].lower() + def test_allowed_hosts(): imp.reload(config) @@ -32,6 +38,9 @@ def test_allowed_hosts(): def test_logging(): imp.reload(config) + assert 'console' in config.LOGGING['handlers'] + + def test_secret_key(): os.environ['SECRET_KEY'] = 'SECRET'