mirror of
https://github.com/kennethreitz/django-heroku.git
synced 2026-06-05 06:56:12 +00:00
futher tests
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user