Commit Graph

951 Commits

Author SHA1 Message Date
Leo Hemsted
a3eb4a643e Merge pull request #390 from alphagov/template-statistics-api
add template_statistics endpoint for specific template
2016-06-07 16:12:56 +01:00
Leo Hemsted
e3d9dfad6e add template_statistics endpoint for specific template
`/service/<service_id>/template-statistics/<template_id>`
still requires service-id just to try and keep api tree cleaner
2016-06-07 14:18:42 +01:00
NIcholas Staples
73004a0f74 Merge pull request #389 from alphagov/log_bug_fix
Update log messages so they don't produce an error on the utils logger.
2016-06-07 12:37:25 +01:00
Nicholas Staples
903c479d7a Update log messages so they don't produce an error on the utils logger. 2016-06-07 11:59:13 +01:00
Rebecca Law
dbf6724511 Merge pull request #388 from alphagov/rename-notify-service
Rename notify service to GOV.UK Notify
2016-06-07 10:10:04 +01:00
Rebecca Law
4d072cb113 Rename notify service to GOV.UK Notify 2016-06-07 09:55:10 +01:00
Adam Shimali
207d9088c4 Merge pull request #384 from alphagov/invite-permissions-fix
API receives full set of permission names
2016-06-07 09:36:32 +01:00
Rebecca Law
d3c85732bc Merge pull request #383 from alphagov/use-notify-to-send-sms-codes
Use notify to send sms codes
2016-06-06 14:30:25 +01:00
Adam Shimali
63c29a3a3d API recieves full set of permissions names on create of user
invite. This is instead of mapping from permission groups to individual
permissions on user creation.
2016-06-06 12:37:06 +01:00
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
Chris Hill-Scott
37a3c27124 Merge pull request #380 from alphagov/bump-utils
Bump utils to latest version
2016-06-06 11:17:26 +01:00
Chris Hill-Scott
e51f6c6916 Merge pull request #378 from alphagov/order-templates-created-at
Order templates by newest created first
2016-06-06 11:17:21 +01:00
Chris Hill-Scott
34740c5827 Bump utils to latest version
This commit doesn’t introduce any new functionality, just keeps things
from getting too far behind.

This is a breaking change in utils, see:
4683922d30

None of these methods are used by the API, so no API code needs to
change, cf:

https://github.com/alphagov/notifications-api/search?utf8=%E2%9C%93&q=rows_with_errors&type=Code
https://github.com/alphagov/notifications-api/search?utf8=%E2%9C%93&q=has_errors&type=Code
https://github.com/alphagov/notifications-api/search?utf8=%E2%9C%93&q=annotated_rows&type=Code
https://github.com/alphagov/notifications-api/search?utf8=%E2%9C%93&q=annotated_rows_with_errors&type=Code
2016-06-06 11:05:32 +01:00
Chris Hill-Scott
c2ae4773da Order templates by newest created first
When you add a new template, it’s probably the one that you want to do
subsequent stuff with. But it’s also helpful to see the template in
context (with its siblings) to understand that there are multiple
templates. So we don’t want to do what we do in
https://github.com/alphagov/notifications-admin/pull/648
for adding a new template.

But we _can_ make your brand-new template appear first by always
ordering by when the template was created.

This also removes the confusion caused by having `updated_at` affecting
order, and causing the templates to move around all the time.
2016-06-06 10:44:40 +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