From ccf58472c8027f5e6b19f61bf39b923935e76b7c Mon Sep 17 00:00:00 2001 From: sloria Date: Mon, 29 Sep 2014 23:43:40 -0400 Subject: [PATCH] Fix travis.yml; use py.test and install dev-requirements Fixes #25 --- {{cookiecutter.app_name}}/.travis.yml | 6 ++---- .../{{cookiecutter.app_name}}/settings.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.app_name}}/.travis.yml b/{{cookiecutter.app_name}}/.travis.yml index d102477..70c1b80 100644 --- a/{{cookiecutter.app_name}}/.travis.yml +++ b/{{cookiecutter.app_name}}/.travis.yml @@ -6,8 +6,6 @@ python: - "3.3" - "2.7" -# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: pip install -r requirements.txt +install: pip install -r requirements/dev.txt -# command to run tests, e.g. python setup.py test -script: nosetests +script: py.test tests diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py index fe57c51..51e6b12 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py @@ -4,7 +4,7 @@ import os os_env = os.environ class Config(object): - SECRET_KEY = os_env['{{cookiecutter.app_name | upper}}_SECRET'] # TODO: Change me + SECRET_KEY = os_env.get('{{cookiecutter.app_name | upper}}_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) BCRYPT_LOG_ROUNDS = 13