Leo Hemsted
4cdcc4e035
no longer add an annual billing entry creating a service
...
this is now handled by a separate call from the admin app
2017-12-06 14:45:44 +00:00
Leo Hemsted
a4e2a40134
update dao tests to pass in free sms fragment limit, remove command
2017-12-06 14:45:43 +00:00
Leo Hemsted
b0d4044ff5
remove free_sms_fragment_limit from service
...
* remove from model
* still required when calling POST /service - we just call through
from dao_create_service to add a new annual billing entry.
* removed from POST /service/<id> update_service - if you want to
update/add a new one, use POST /service/<id>/free-sms-fragment-limit
* made sure tests create services with default 250k limit.
2017-12-06 14:45:43 +00:00
Ken Tsang
7b390e74c4
Upper case the filename to meet requirements
2017-12-05 16:03:08 +00:00
kentsanggds
30d66c3d62
Merge branch 'master' into ken-add-letters-pdf-s3-bucket
2017-12-05 15:29:28 +00:00
venusbb
20b306bfdb
added more unit tests
2017-12-05 13:57:46 +00:00
venusbb
185155a521
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-callback-receipt-1
2017-12-05 12:04:18 +00:00
venusbb
1c1cdbdf7c
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-callback-receipt-1
2017-12-05 10:49:05 +00:00
Rebecca Law
06a6d37595
Merge branch 'master' into add-crown-column-to-services
2017-12-05 10:28:26 +00:00
venusbb
5482ee4fe7
- wrap apply_async parameter notification_id in a str() argument
...
- check if service_callback_api exist before putting tasks on queue
- create_service_callback_api in tests before asserting if send_delivery_status_to_service has been called.
2017-12-04 17:58:38 +00:00
Ken Tsang
aa39f47d8e
Added letters pdf S3 upload function
...
- uses s3upload from notifications_utils which will create an s3 bucket if it doesn't already exist
2017-12-04 16:48:38 +00:00
Rebecca Law
7fa4e7ffc7
Set crown if organisation_type is updated on service.
...
Add some tests.
Update the initial values of crown.
2017-12-04 16:07:26 +00:00
Leo Hemsted
5bb6b68e57
fix tests that expect to be rate limited (which is off if redis is disabled)
2017-12-04 14:13:43 +00:00
Katie Smith
f73319f5ef
Add and populate crown column to services and services_history
...
- Added the boolean 'crown' column to services and services_history tables
- We populate this column in the same migration script by checking the
'organisation_type' of a service
2017-12-04 13:31:08 +00:00
Leo Hemsted
88c878c83e
don't hit the query to get daily msg stats if redis is disabled
2017-12-04 11:12:26 +00:00
venusbb
771ce9e2bc
fixed code style
2017-12-01 22:24:53 +00:00
venusbb
f5a0ca9184
Added delivery status to services for letter callbacks
2017-12-01 21:59:46 +00:00
venusbb
096657799c
Added send delivery status to SES callbacks
2017-12-01 21:13:01 +00:00
venusbb
a604fb82bb
added sms delivery status callback
2017-12-01 21:11:56 +00:00
Alexey Bezhan
1bcca032c2
Merge pull request #1424 from alphagov/create-history-using-init-kwargs
...
Use model constructors when creating history instances
2017-12-01 16:42:29 +00:00
venusbb
489f43a2c9
rename callback_tasks.py to process_ses_receipts.py
...
create service_callback_tasks.py for tasks to send delivery statuses to services
2017-12-01 16:15:21 +00:00
venusbb
ad861f2d55
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-receipt-callback-dao
2017-12-01 14:36:25 +00:00
venusbb
988b22391b
added send_delivery_status_to_service task worker
2017-12-01 14:06:13 +00:00
venusbb
a0fe5c6971
created dao to get notifications by references
2017-12-01 09:31:03 +00:00
Alexey Bezhan
54ef53cefe
Add a test for creating a template with reply_to through the API
2017-11-30 17:31:39 +00:00
venusbb
bf8fe09908
changed name of endpoint from service_callback to delivery_receipt
2017-11-30 11:27:07 +00:00
Rebecca Law
876d30e675
Merge branch 'master' into stop-populating-mapping-tables
2017-11-30 11:20:29 +00:00
venusbb
d03280776d
CodeStyle correction
2017-11-30 09:38:57 +00:00
venusbb
6a994793dc
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-receipt-callback-dao
2017-11-29 17:39:33 +00:00
venusbb
02f8ad4db2
added test for service_callback_api rest
2017-11-29 17:36:43 +00:00
Leo Hemsted
be94894753
fix linter stuff
2017-11-29 17:18:53 +00:00
Rebecca Law
a5ceb4ba3c
Fix linter
2017-11-29 17:17:08 +00:00
Rebecca Law
8fc0c8b10d
Merge branch 'master' into stop-populating-mapping-tables
2017-11-29 16:57:29 +00:00
Leo Hemsted
4e741bab90
Merge pull request #1441 from alphagov/flake8-tests
...
Flake8 tests
2017-11-29 16:54:29 +00:00
Rebecca Law
8aa94af5d7
Stop populating the notification to sender mapping table when creating a notificaiton.
2017-11-29 16:47:23 +00:00
venusbb
8dc0455f70
move inbound_api tests into test_callback_rest.py
2017-11-29 16:43:09 +00:00
venusbb
c07e804319
Created service_callback_api daos
2017-11-29 15:58:11 +00:00
Rebecca Law
ac6d041d26
Merge branch 'master' into use-reply-to-in-send-to-provider
2017-11-29 14:34:28 +00:00
Rebecca Law
39950c47bc
Remove \t
2017-11-29 14:30:02 +00:00
Leo Hemsted
82acec87b6
flake8 the entire repo now that the tests are good 👌
2017-11-28 17:29:43 +00:00
Leo Hemsted
08494ef206
more flake8. lots of unused imports and variables that didn't get used. i tried to preserve old variable names as comments when it looked like they were useful (eg when they were describing timestamps)
2017-11-28 17:23:09 +00:00
Leo Hemsted
b1cccdcc6b
First batch of flake8 changes.
...
Many unused variables, and replacing some old fixtures with
admin_request before I realised just how many there where 😩
2017-11-28 17:00:01 +00:00
Leo Hemsted
043dee5a54
ensure no tests share the same name (using flake8's checker)
2017-11-28 14:28:01 +00:00
Leo Hemsted
9a0c01fee5
Merge pull request #1436 from alphagov/click-tweaks
...
Click tweaks
2017-11-28 14:26:29 +00:00
Rebecca Law
0d86738696
Merge branch 'master' into use-reply-to-in-send-to-provider
2017-11-28 13:20:26 +00:00
Rebecca Law
a7232381bf
Merge pull request #1433 from alphagov/add-reply-to-notifications
...
Populate reply-to-text field in notifications
2017-11-28 13:19:36 +00:00
Leo Hemsted
5b7118973e
take advantage of click's type validation/coercion
...
(saves us having to write the stuff ourselves). Also adds a small
click plugin to do datetime parsing.
Sample output:
```
[leohemsted:~/dev/api]$ flask command create_provider_rates --help
Usage: flask command create_provider_rates [OPTIONS]
Backfill rates for a given provider
Options:
-p, --provider_name [mmg|firetext|ses]
[required]
-c, --cost FLOAT Cost (pence) per message including decimals
[required]
-d, --valid_from DATE [required]
--help Show this message and exit.
[leohemsted:~/dev/api]$ flask command create_provider_rates -p ses -c 1.234 -d invalid
Usage: flask command create_provider_rates [OPTIONS]
Error: Invalid value for "-d" / "--valid_from": Could not parse datetime string "invalid" formatted as %Y-%m-%dT%H:%M:%S
```
2017-11-28 12:50:29 +00:00
Rebecca Law
b0d88ec08c
Updates as per review comments
2017-11-28 11:05:56 +00:00
Leo Hemsted
2b54c2308b
fix test that did not depend on the notify-db-session fixture, so left a messy db
2017-11-28 10:42:54 +00:00
Rebecca Law
ab5b7c20a7
Use sms sender or reply to email address of the Notify service in create_2fa_code depending on message type.
2017-11-27 16:52:52 +00:00