Commit Graph

131 Commits

Author SHA1 Message Date
Martyn Inglis
dc294c32ae Fix all other dependant classes that are affected by the DAO / Service / Model changes 2016-02-19 15:54:11 +00:00
Nicholas Staples
0396148853 Permissions added. 2016-02-19 14:47:45 +00:00
Rebecca Law
c1df61a7d4 Use celery to send the email verification code. 2016-02-18 09:52:27 +00:00
Rebecca Law
9073814d9f I have an issue with the test, not sure why? 2016-02-17 17:48:23 +00:00
Rebecca Law
d022d036dc Celery task to send the sms verify code.
Each celery task will use it's own queue.
2016-02-17 15:41:33 +00:00
Martyn Inglis
a2341be0e2 Don't send the SMS if we have failed to save in the database 2016-02-16 17:42:04 +00:00
Martyn Inglis
e42da7dd54 Fixing up tests to validate the call to the celery tasks.
- mocker used to test call or otherwise of the task
- no new tests just a spring clean
2016-02-16 14:06:56 +00:00
Nicholas Staples
bd947d0743 Merge remote-tracking branch 'origin/master' into remove_alpha_client_from_api 2016-02-09 15:54:21 +00:00
Adam Shimali
e5e049d735 Added service and template relationship to notification model.
This makes it more consistent with other model classes with respect
to marhmallow serialisation/deserialisation.
2016-02-09 12:48:27 +00:00
Adam Shimali
c7121be5a2 [WIP] New model class and dao for notification. This will be used for
recording status and outcome of sending notifications.
2016-02-09 12:03:40 +00:00
Nicholas Staples
2fda7ee59b Alpha client removed from code. Tests fixed but will wait till other notifications jobs are done before creating a pull request. 2016-02-09 11:38:57 +00:00
Rebecca Law
b5c662eca8 Change services.id to a UUID
Ideally all the primary keys in the db would be UUID in order to guarantee unique ids across distributed dbs.
This updates the services.id to a UUID. All the tables with a foreign key to the services.id are also updated.
The endpoints no longer state a data type of the <service_id> path param.
All the tests are updated to reflect this update.

The thing to pay attention to is the 0011_uuid_service_id.py migration script.
This commit must go with a commit on the notifications_admin app to keep things working.
There will be a small outage until both deploys have happened.
2016-02-02 14:22:22 +00:00
Rebecca Law
42a4c8b0b1 Add sms notifications from a service to a queue. 2016-01-27 17:42:05 +00:00
Rebecca Law
daff1c3f53 Add queue name to service table.
Set queue name when creating the service
2016-01-27 14:18:11 +00:00
Rebecca Law
5dc48f8a01 Updated send user code to use an optional to field to send emails
Added tests for send_user_code
2016-01-27 11:51:02 +00:00
Nicholas Staples
a9fe6ad469 Working code and tests. 2016-01-22 14:43:30 +00:00
Nicholas Staples
6b035cd324 All tests working, second time around. 2016-01-21 17:29:24 +00:00
Rebecca Law
1db57dca8c Allow for multiple api keys for a service. 2016-01-19 18:25:21 +00:00
Rebecca Law
15b2d414cc Updates from review comments:
Update api_key relationship.
Check that id in dict exists before deleting it
2016-01-19 13:11:22 +00:00
Rebecca Law
4fc5c34320 Change Tokens to ApiKey
Added name to ApiKey model
2016-01-19 12:13:47 +00:00
Adam Shimali
f839bae1f5 Add rest of user model fields to api.
First step to moving user interactions to api.
2016-01-19 11:39:59 +00:00
Adam Shimali
f3b6769193 Add convenience fields to job to make processing
easier.
2016-01-16 10:14:48 +00:00
Rebecca Law
96ba2d13b3 Updated job endpoint tests with authorization header 2016-01-15 17:11:02 +00:00
Rebecca Law
0ad292300d Added authorization headers for all requests 2016-01-15 17:02:29 +00:00
Adam Shimali
012cff5ae2 test cleanup with fixtures 2016-01-15 12:16:07 +00:00
Rebecca Law
436f45b70d Moved the _generate_token methods to the tokens_dao. 2016-01-14 11:30:45 +00:00
Nicholas Staples
dad0fff4ba Template rest api skeleton added. 2016-01-13 11:04:13 +00:00
Nicholas Staples
74547013ba All four http methods working now for user and service restful apis. 2016-01-11 17:19:06 +00:00
Nicholas Staples
49e98c21e7 Service and User API added, working with tests. Still need to polish the edges and add more tests. 2016-01-11 15:07:13 +00:00
Nicholas Staples
0bc4d02713 Work in progress, skeleton of the api created and testing started. Need to fix authentication tests. 2016-01-08 17:51:46 +00:00
Nicholas Staples
5bcc615825 Added dao, test framework and tests for dao. 2016-01-08 12:18:12 +00:00