From f278d21a68b7c8a3a575b69ad91257b269fe69e4 Mon Sep 17 00:00:00 2001 From: William MURA Date: Tue, 4 Nov 2014 09:28:21 -0500 Subject: [PATCH] add sms notification service --- webserver/controllers/orders.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webserver/controllers/orders.py b/webserver/controllers/orders.py index 0e5440e..3835296 100644 --- a/webserver/controllers/orders.py +++ b/webserver/controllers/orders.py @@ -3,7 +3,7 @@ from flask import Blueprint, json, make_response, request from flask.ext.login import AnonymousUserMixin from flask.ext.babel import gettext -from webserver import db +from webserver import db, app from webserver.lib.base import jsonify from webserver.models import Order, StateOrder, Client @@ -170,11 +170,8 @@ def update(id): order.state_id = state.id - # TODO: Get TestingConfig from current config - TestingConfig = True - # SMS Notification - if TestingConfig is False: # pragma: no cover + if app.config['TESTING'] is False: # pragma: no cover client = TwilioRestClient(TwilioConfig.ACCOUNT_SID, TwilioConfig.AUTH_TOKEN) client.messages.create( to="+15142902316",