From da771c6be7c97d2cbb4596a2b0c859f58bec3575 Mon Sep 17 00:00:00 2001 From: SunDwarf Date: Sat, 29 Aug 2015 14:20:09 +0100 Subject: [PATCH] Use coverage scripts. --- .travis.yml | 3 ++- flask_s3.py | 2 +- requirements.txt | 3 +++ test_flask_static.py | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b61183..9eb2d7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,6 @@ python: # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors install: pip install -r requirements.txt --use-mirrors # command to run tests, e.g. python setup.py test -script: nosetests +script: nosetests --with-coverage --cover-package=flask_s3 +after_success: coveralls sudo: false diff --git a/flask_s3.py b/flask_s3.py index b112b73..f4f91f2 100644 --- a/flask_s3.py +++ b/flask_s3.py @@ -314,7 +314,7 @@ class FlaskS3(object): :param app: the :class:`flask.Flask` application object. """ - defaults = [('S3_USE_HTTPS', True), + defaults = [('S3_USE_HTTP', False), ('USE_S3', True), ('USE_S3_DEBUG', False), ('S3_BUCKET_DOMAIN', 's3.amazonaws.com'), diff --git a/requirements.txt b/requirements.txt index 1c3fe21..da4c3eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,6 @@ Flask boto3 six +coverage +coveralls +nose \ No newline at end of file diff --git a/test_flask_static.py b/test_flask_static.py index 843ecbd..05e86c8 100644 --- a/test_flask_static.py +++ b/test_flask_static.py @@ -36,7 +36,7 @@ class FlaskStaticTest(unittest.TestCase): def test_config(self): """ Tests configuration vars exist. """ FlaskS3(self.app) - defaults = ('S3_USE_HTTPS', 'USE_S3', 'USE_S3_DEBUG', + defaults = ('S3_USE_HTTP', 'USE_S3', 'USE_S3_DEBUG', 'S3_BUCKET_DOMAIN', 'S3_CDN_DOMAIN', 'S3_USE_CACHE_CONTROL', 'S3_HEADERS', 'S3_URL_STYLE')