Commit Graph

938 Commits

Author SHA1 Message Date
Rebecca Law
be9fde1420 Fix tests for sending sms codes.
Since the unit tests delete the data in between tests I need to add the template data for the test for send sms code.
2016-06-06 11:51:12 +01:00
Rebecca Law
dbc57e3b58 [WIP]
use send_sms task to send sms code.
Tests are broken because the template data for the Notify service is being delete after every test. Need a way to seed the data for the test.
2016-06-03 15:15:46 +01:00
Rebecca Law
eae0c252a0 Merge pull request #371 from alphagov/use-notify-to-send-codes
Add a service for Notify to use to send messages
2016-06-03 11:00:04 +01:00
Rebecca Law
ba67b0c89d Change email address of user.
Removed permissions because it not a real user or person.
2016-06-03 10:51:34 +01:00
Rebecca Law
215e96689b Merge branch 'master' into use-notify-to-send-codes 2016-06-03 09:25:21 +01:00
Rebecca Law
811e4e0212 Revert change with setting the id 2016-06-03 09:11:53 +01:00
Leo Hemsted
470ee221b6 Merge pull request #372 from alphagov/delivery-code-statsd
Delivery code statsd
2016-06-02 17:03:29 +01:00
Leo Hemsted
a487931323 python 34 compatibility 2016-06-02 16:49:34 +01:00
Leo Hemsted
54a1adfe8b fix copypasta error with ses test 2016-06-02 16:30:40 +01:00
Leo Hemsted
d41048f4aa statsd counters for callback statuses
also for the 'code' param from firetext
2016-06-02 15:53:04 +01:00
Rebecca Law
4910483f39 Add a service that will be used to send Notify's messages.
Including sms code, email verification, invitation emails, and password reset emails
Added the service id and template ids to config.
Small change to dao_create_service to use id if set.
2016-06-02 15:34:43 +01:00
Leo Hemsted
af89f86389 Merge pull request #368 from alphagov/travis-cache
caching in travis
2016-06-02 12:13:57 +01:00
minglis
db70cf9ebf Merge pull request #360 from alphagov/research-mode-implementation
Research mode implementation
2016-06-02 11:59:47 +01:00
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
Leo Hemsted
79c20a8880 caching in travis 2016-06-02 11:05:52 +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
minglis
04a644b66f Merge pull request #362 from alphagov/create_notification_provider_stats_bug
Provider stats only updated if the provider successfully sends the me…
2016-06-02 09:25:10 +01:00
Martyn Inglis
49f386e7c5 Refactored to put notifications update last 2016-06-02 09:17:06 +01:00
Martyn Inglis
6ca2e588a9 Re-aligned the dao update that moved by mistake 2016-06-02 08:59:30 +01:00
Martyn Inglis
97e29b9039 Merge branch 'master' into research-mode-implementation 2016-06-01 17:06:38 +01:00
minglis
cf1b777fe6 Merge pull request #357 from alphagov/research-mode
Add research mode to service/history tables
2016-06-01 16:58:54 +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
Leo Hemsted
0a8cb679d7 make mmg and firetext client params consistent 2016-06-01 15:58:48 +01:00
Rebecca Law
ec7d9b1c6e Use a more pythonic way to compare the dicts. 2016-06-01 13:55:04 +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
a97f3bbb4f Merge pull request #359 from alphagov/send_tasks_bug
Notification not created in send_sms or send_email when service is in…
2016-05-31 15:42:54 +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
9aa727e0cf Add research mode to service/history tables
- added as a nullable boolean column.
2016-05-31 11:29:20 +01:00
minglis
8710c103f7 Merge pull request #354 from alphagov/deadlock-fix
Reorder updates to the notification / stats tables to match create.
2016-05-31 10:28:32 +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
a7a669a7c2 Merge pull request #353 from alphagov/permanent-failure-firetext
Permanent failure firetext
2016-05-27 14:32:45 +01:00
Rebecca Law
97088a4af1 Added a comment to explain how the delivery receipt will affect the notification status. 2016-05-27 12:28:58 +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
b563953626 Merge pull request #352 from alphagov/notification-statistics-bug
notifications/statistics returns when no stats exist for today
2016-05-26 17:15:34 +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