make test config inherit from dev config

gets some secret keys and things set up for free
This commit is contained in:
Leo Hemsted
2018-02-21 18:42:24 +00:00
parent 073c48a0a7
commit ee1be970fc
2 changed files with 3 additions and 17 deletions

View File

@@ -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')

View File

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