Updated to send email through the client send_email.

This commit is contained in:
Nicholas Staples
2016-01-20 14:45:50 +00:00
parent ae781bc58d
commit 75d7110642
6 changed files with 6 additions and 9 deletions

View File

@@ -128,8 +128,6 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
message, message,
job_id=None, job_id=None,
description=None): description=None):
print("{0} {1} {2} {3}".format(
mobile_number, message, job_id, description))
self.send_sms_notification(mobile_number, message) self.send_sms_notification(mobile_number, message)
def send_email(self, def send_email(self,
@@ -139,5 +137,4 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
subject, subject,
job_id=None, job_id=None,
description=None): description=None):
print("{0} {1} {2} {3} {4} {5}".format( self.send_email_notification(email_address, message, from_address, subject)
email_address, message, from_address, subject, job_id, description))

View File

@@ -22,7 +22,7 @@ class UserApiClient(BaseAPIClient):
"password": password "password": password
} }
user_data = self.post("/user", data) user_data = self.post("/user", data)
return User(user_data, max_failed_login_count=self.user_max_failed_login_count) return User(user_data['data'], max_failed_login_count=self.user_max_failed_login_count)
class User(object): class User(object):

View File

@@ -11,6 +11,6 @@ Flask-Bcrypt==0.6.2
credstash==1.8.0 credstash==1.8.0
boto3==1.2.3 boto3==1.2.3
git+https://github.com/alphagov/notifications-python-client.git@0.1.8#egg=notifications-python-client==0.1.8 git+https://github.com/alphagov/notifications-python-client.git@0.1.9#egg=notifications-python-client==0.1.9
git+https://github.com/alphagov/notifications-utils.git@0.0.3#egg=notifications-utils==0.0.3 git+https://github.com/alphagov/notifications-utils.git@0.0.3#egg=notifications-utils==0.0.3