Add test number for functional testing.

This commit is contained in:
Rebecca Law
2016-02-08 15:22:19 +00:00
parent 4338bc9aaf
commit 05adb1f3ad
2 changed files with 4 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
from flask import current_app
class BrowsableItem(object):
@@ -32,6 +33,8 @@ class InvalidPhoneError(Exception):
def validate_phone_number(number):
if number == current_app.config['TWILIO_TEST_NUMBER']:
return number
sanitised_number = number.replace('(', '')
sanitised_number = sanitised_number.replace(')', '')

View File

@@ -42,6 +42,7 @@ class Config(object):
HEADER_COLOUR = '#FFBF47' # $yellow
AWS_REGION = 'eu-west-1'
TWILIO_TEST_NUMBER=os.getenv('TWILIO_TEST_NUMBER')
class Development(Config):