From ee1be970fc8581782920e49309aab3d91ab6f27a Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Wed, 21 Feb 2018 18:42:24 +0000 Subject: [PATCH] make test config inherit from dev config gets some secret keys and things set up for free --- app/config.py | 8 +++----- pytest.ini | 12 ------------ 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/app/config.py b/app/config.py index 648128cc6..dbd8ba68b 100644 --- a/app/config.py +++ b/app/config.py @@ -353,18 +353,16 @@ class Development(Config): API_RATE_LIMIT_ENABLED = True -class Test(Config): +class Test(Development): NOTIFY_EMAIL_DOMAIN = 'test.notify.com' FROM_NUMBER = 'testing' NOTIFY_ENVIRONMENT = 'test' - DEBUG = True TESTING = True + CSV_UPLOAD_BUCKET_NAME = 'test-notifications-csv-upload' LETTERS_PDF_BUCKET_NAME = 'test-letters-pdf' DVLA_RESPONSE_BUCKET_NAME = 'test.notify.com-ftp' - STATSD_ENABLED = True - STATSD_HOST = "localhost" - STATSD_PORT = 1000 + # this is overriden in jenkins and on cloudfoundry SQLALCHEMY_DATABASE_URI = os.getenv('SQLALCHEMY_DATABASE_URI', 'postgresql://localhost/test_notification_api') diff --git a/pytest.ini b/pytest.ini index a76815501..69b9a6712 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,20 +1,8 @@ [pytest] testpaths = tests env = - D:SQLALCHEMY_DATABASE_URI=postgresql://@localhost/test_notification_api - SECRET_KEY=secret-key - DANGEROUS_SALT=dangerous-salt NOTIFY_ENVIRONMENT=test - ADMIN_CLIENT_SECRET=dev-notify-secret-key - ADMIN_BASE_URL=http://localhost:6012 - FROM_NUMBER=from_number - MMG_URL=https://api.mmg.co.uk/json/api.php MMG_API_KEY=mmg-secret-key LOADTESTING_API_KEY=loadtesting FIRETEXT_API_KEY=Firetext - STATSD_PREFIX=stats-prefix NOTIFICATION_QUEUE_PREFIX=testing - REDIS_URL=redis://localhost:6379/0 - FLASK_APP=application.py - FLASK_DEBUG=1 - WERKZEUG_DEBUG_PIN=off