Martyn Inglis
b8638a891f
Merge branch 'master' into research-mode-implementation
...
Conflicts:
tests/app/conftest.py
2016-06-02 11:53:06 +01:00
Leo Hemsted
a51d6fae47
Merge pull request #363 from alphagov/send-sms-tests
...
send_sms tests
2016-06-02 11:27:57 +01:00
Martyn Inglis
5e1613e461
pep8 too many lines
2016-06-02 10:35:54 +01:00
Rebecca Law
b2a26e3dce
Merge pull request #361 from alphagov/do-not-create-new-tempalte-version
...
Check for an update before saving template
2016-06-02 10:11:55 +01:00
Martyn Inglis
c6c534365e
Fixing tests as stats update now don't update reference
2016-06-02 10:00:27 +01:00
Martyn Inglis
754ccbe9af
Removed update reference from updating the provider stats
...
- single focus method
- allows not to pollute DAO with research mode
2016-06-02 09:52:47 +01:00
Martyn Inglis
099c17192d
Merged provider stats only on success branch
...
- ensures that don't raise stats in research mode
2016-06-02 09:30:01 +01:00
Martyn Inglis
001149c263
Merge branch 'master' into research-mode-implementation
2016-06-02 09:28:35 +01:00
Martyn Inglis
b08f906662
Added 2 tests to ensure provider stats not updated when in research nmode
2016-06-02 09:28:21 +01:00
Martyn Inglis
97e29b9039
Merge branch 'master' into research-mode-implementation
2016-06-01 17:06:38 +01:00
Martyn Inglis
290f416485
Various tidy ups and changes
...
- use new queue
- remove some new lines in AWS response data
- migration script to populate new fields
2016-06-01 16:57:57 +01:00
Leo Hemsted
a3b847bf64
tests for send_sms through mmg/firetext
2016-06-01 15:59:44 +01:00
Nicholas Staples
276ca15919
Provider stats only updated if the provider successfully sends the message.
2016-06-01 12:43:26 +01:00
Rebecca Law
047a7d5488
Only test the items of the template that can change on an update request.
...
Return 200 if no change is made.
2016-06-01 12:19:59 +01:00
Rebecca Law
05e72b07ae
Return status code 304 when template is not updated.
...
Moved import
2016-06-01 11:50:45 +01:00
Rebecca Law
0a9cdbd75a
Do not create a new version of the template if there is no change to the tempalte.
2016-06-01 10:53:03 +01:00
Martyn Inglis
909fac3c05
Added research mode tasks
...
- if a service is in research mode the don't send the notifications via the providers (MMG/SES/etc)
- instead set up a task to mimic those services callbacks - this completes the loop, and show stats, delivery receipts and so on.
- Use the "to" field to choose the response, allows users to create successful and errored notifications
temp fail sms, uses "07833333333"
perm fail sms, uses = "07822222222"
success = "07811111111" (or anything else)
success email = "delivered@simulator.notify "
perm fail = "perm-fail@simulator.notify "
temp fail = "temp-fail@simulator.notify "
2016-05-31 16:55:26 +01:00
Nicholas Staples
79dfc360f2
Notification not created in send_sms or send_email when service is in restricted mode.
2016-05-31 14:55:06 +01:00
Martyn Inglis
9617f0748b
Added some tests around creating and updated services
...
- ensure research mode is respected on creation and update
- ensure rest client gives an error for bad research mode update
2016-05-31 12:49:06 +01:00
Martyn Inglis
2108bb52d5
Reorder updates to the notification / stats tables to match create.
2016-05-31 10:17:15 +01:00
Rebecca Law
2bfa9b7e10
Merge branch 'master' into permanent-failure-firetext
2016-05-27 12:10:59 +01:00
Rebecca Law
885abcaf16
Make update notification status transcational.
...
Refactor methods for reusability.
2016-05-27 12:09:36 +01:00
Leo Hemsted
a90a18541f
notifications/statistics returns when no stats exist for today
...
moved filtering from WHERE to JOIN ON so that when join suceeds but filter fails, we dont lose the service's data from the results set
2016-05-26 16:48:30 +01:00
Rebecca Law
25a1b7f31c
Firetext does not have a status code for temporary-failure.
...
In order to set a message as temporary-failure, we check if it is in pending status first.
Otherwise a delivery receipt for failure is set to permanent failure.
2016-05-26 16:46:00 +01:00
Rebecca Law
c5ec07a9ce
Merge branch 'master' into permanent-failure-firetext
2016-05-25 15:45:42 +01:00
Rebecca Law
83df16025d
Merge pull request #347 from alphagov/get-jobs-created-in-last-7-days
...
Add a limit days query param for get all jobs.
2016-05-25 11:36:31 +01:00
Rebecca Law
a67793cf8a
Updated date query so that the created_at date is truncated so that we get all jobs created number of days requested.
2016-05-25 11:13:49 +01:00
Rebecca Law
2a7872cce1
Add a limit days query param for get all jobs.
2016-05-24 17:21:04 +01:00
Rebecca Law
6735a7103c
Merge pull request #345 from alphagov/notification-job-status-counts
...
Notification job status counts
2016-05-24 16:47:00 +01:00
Rebecca Law
d6c7f03607
Added another assert to the test
2016-05-24 16:37:05 +01:00
Rebecca Law
fa152c4431
Mark a declined message from Firetext as permanent-failure rather than failed.
2016-05-24 15:32:48 +01:00
Leo Hemsted
24625a44f3
prevent public api from sending archived templates
2016-05-24 13:08:38 +01:00
Leo Hemsted
7801efd5ca
don't create job if template has been archived
2016-05-24 13:08:02 +01:00
Rebecca Law
e4eecb894a
Update job.notifications_delivered and job.notifications_failed count when updating the status of a notification.
2016-05-24 11:31:44 +01:00
Rebecca Law
dff60175a4
Add jobs.notifications_delivered and jobs.notifications_failed counts to the jobs table.
2016-05-23 15:44:57 +01:00
Leo Hemsted
5ebae9c66c
only return unarchived templates when getting all templates
...
get_specific_template functions happily return archived templates
2016-05-23 14:20:02 +01:00
Rebecca Law
cf2723bdc9
If the sms client provider sends more than one delivery receipt only take the update for the the first one.
...
Only update the notification.status if status = sending.
2016-05-20 17:04:56 +01:00
Rebecca Law
a8c79bf80d
Merge pull request #334 from alphagov/case-insensitive-email
...
Make the get_user_by_email_address case insensitive.
2016-05-20 15:55:38 +01:00
Leo Hemsted
81e5eb2c0a
return all zeros when NotificationStatistics dont exist
2016-05-20 15:24:57 +01:00
Rebecca Law
0f9a019945
Make the get_user_by_email_address case insenstive.
2016-05-20 13:43:31 +01:00
Leo Hemsted
1b27c15c16
/notifications/statistics now takes 'day' parameter
...
avoids potential issues with date.today being inconsistent with user timezone
2016-05-20 11:31:35 +01:00
Leo Hemsted
f7768366a1
added test_notification_statistics file
...
put in new rest subfolder in anticipation of refactoring test_rest.py
2016-05-20 09:57:31 +01:00
Nicholas Staples
1797d9360b
Update template json to return created_at and updated_at. Also fixed a bug where updated_at was not being added to the templates_history model.
2016-05-19 17:02:55 +01:00
NIcholas Staples
e0f6b4e571
Merge pull request #327 from alphagov/add_job_row_number
...
Added job row number to the notification for csv jobs. All tests pass…
2016-05-19 14:33:21 +01:00
Adam Shimali
955005d7fe
Added additional outcome status codes to mmg responses.
2016-05-19 11:27:22 +01:00
Nicholas Staples
0fe0c1d2b4
Added job row number to the notification for csv jobs. All tests passing.
2016-05-19 10:46:03 +01:00
NIcholas Staples
03df991b38
Merge pull request #326 from alphagov/test_task_bug
...
Fix test to check for decrypted dictionary value.
2016-05-18 16:22:45 +01:00
Nicholas Staples
c46216dd96
Fix test to check for decrypted dictionary value.
2016-05-18 14:28:19 +01:00
Nicholas Staples
15607c0977
Add server_commands and update readme.md
...
Update command to search for services from the user.
2016-05-18 12:20:56 +01:00
Nicholas Staples
6e7383de33
Removed template subject uniqueness
2016-05-18 10:00:09 +01:00