test_config.py 900 B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. """Test configs."""
  3. from walle.app import create_app
  4. from walle.config.settings_dev import DevConfig
  5. from walle.config.settings_test import TestConfig
  6. from walle.config.settings_prod import ProdConfig
  7. # def test_production_config():
  8. # """Production config."""
  9. # app = create_app(ProdConfig)
  10. # assert app.config['ENV'] == 'prod'
  11. # assert app.config['DEBUG'] is False
  12. # assert app.config['DEBUG_TB_ENABLED'] is False
  13. # assert app.config['ASSETS_DEBUG'] is False
  14. # def test_dev_config():
  15. # """Development config."""
  16. # app = create_app(DevConfig)
  17. # assert app.config['ENV'] == 'dev'
  18. # assert app.config['DEBUG'] is True
  19. # assert app.config['ASSETS_DEBUG'] is True
  20. def test_test_config():
  21. """Development config."""
  22. app = create_app(TestConfig)
  23. assert app.config['TESTING'] == True
  24. assert app.config['DEBUG'] is True