diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py index 78e4a6c..282e13f 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py @@ -31,3 +31,9 @@ class DevConfig(Config): DEBUG_TB_ENABLED = True ASSETS_DEBUG = True # Don't bundle/minify static assets CACHE_TYPE = "simple" # Can be "memcached", "redis", etc. + + +class TestConfig(Config): + TESTING = True + DEBUG = True + SQLALCHEMY_DATABASE_URI = 'sqlite://' diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/base.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/base.py index 7bbccd9..2b44d72 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/base.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/base.py @@ -1,16 +1,10 @@ # -*- coding: utf-8 -*- from flask.ext.testing import TestCase -from {{ cookiecutter.app_name }}.settings import Config +from {{ cookiecutter.app_name }}.settings import TestConfig from {{ cookiecutter.app_name }}.app import create_app from {{ cookiecutter.app_name }}.database import db -class TestConfig(Config): - TESTING = True - DEBUG = True - SQLALCHEMY_DATABASE_URI = 'sqlite://' - - class DbTestCase(TestCase): """Base TestCase for tests that require a database."""