Move TestConfig to settings.py

master
Steven Loria 11 years ago
parent 34ba9a1531
commit aca9b39329
  1. 6
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py
  2. 8
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/base.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://'

@ -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."""

Loading…
Cancel
Save