Martyn Inglis
c8a26fcd40
Fixed test names
2017-04-05 16:30:53 +01:00
Martyn Inglis
72ecca4dab
Added a 60 second timeout to the MMG and fire text clients.
...
- This is a CONNECT and a READ timeout.
- Gets wrapped in the standard client exception, with a status code of 504, message Gateway timeout.
- Is quiet noisy in logs to allow us to see it
- Ensures we flick across the provider.
To test change the timeout to 0 and it will timeout.
2017-04-05 15:31:37 +01:00
Martyn Inglis
ac445114c7
When using a priority template put the notification in the priority queue.
...
- there is now a dedicated worker to handle priority queues. We don't now bundle this in the default worker.
2017-04-04 13:44:11 +01:00
Chris Hill-Scott
0ac3bfcb81
Merge pull request #867 from alphagov/bump-utils-lists-as-placeholder-values
...
Bump utils to allow lists as placeholder values
2017-04-03 17:31:30 +01:00
Ken Tsang
817790784f
Fix test for utc to bst conversion
2017-04-03 16:02:26 +01:00
Ken Tsang
2b53e14a73
Add fix for bst
2017-04-03 15:49:23 +01:00
Leo Hemsted
243c0632ed
add test
2017-03-31 17:18:18 +01:00
Chris Hill-Scott
585ef8e66a
Bump utils to allow lists as placeholder values
...
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/128
Also adds a test to make sure that passing a dictionary as a value in
the `personalisation` argument works.
2017-03-31 17:02:54 +01:00
Ken Tsang
d5e8cb3354
Updated cf conf unit tests
2017-03-31 16:50:30 +01:00
Rebecca Law
3838fb583c
The redis cache for daily limits and template usage was being updated for notifications with a test api key.
...
This PR corrects that.
2017-03-30 13:43:44 +01:00
Martyn Inglis
7dcd3164e2
Revert "Reinstating the 2 task model for API submitted notifications."
...
This reverts commit 1c154c4113 .
2017-03-30 10:46:23 +01:00
Martyn Inglis
5cd0507e99
Revert "Fixed faoiling jenkins tests. Mocked the required functions"
...
This reverts commit 4b60c8dada .
2017-03-30 10:46:15 +01:00
Martyn Inglis
9ee26e0b67
Revert "update notification rest tests"
...
This reverts commit 11919d9810 .
2017-03-30 10:38:51 +01:00
Martyn Inglis
385a73da2b
Revert "ensure we're passing through api keys and key types from notifications"
...
This reverts commit 25d1777937 .
2017-03-30 10:38:41 +01:00
Ken Tsang
5f945ab30e
Refactored code, changed now to utcnow in test
2017-03-29 11:47:41 +01:00
Ken Tsang
af78efd137
Fix get_detailed_services BST
2017-03-29 11:03:28 +01:00
kentsanggds
79025e54b0
Merge pull request #865 from alphagov/add-v2-template-preview
...
Add v2 template preview endpoint and schema
2017-03-28 18:40:32 +01:00
Leo Hemsted
d639aa22df
skip failing timezone test
...
TODO fixme
2017-03-28 14:02:47 +01:00
Leo Hemsted
11919d9810
update notification rest tests
2017-03-28 13:51:42 +01:00
Leo Hemsted
25d1777937
ensure we're passing through api keys and key types from notifications
...
when we made the change to async persist notifications, we forgot to
pass through api_key_id and key_type. in send_sms/email, for legacy
reasons, they default to None/KEY_TYPE_NORMAL, so regardless of what
your api key was set up as, we would send real messages!
TODO: Once the PaaS transition is complete and the task changes are
reverted, remove the api_key_id and key_type params from the send_*
tasks entirely, as those are only called from the csv job flow, and
don't need them
2017-03-28 13:14:46 +01:00
Rebecca Law
31979c3272
Use 500 for org id
2017-03-27 17:49:09 +01:00
minglis
d7adfcaf87
Merge pull request #866 from alphagov/no-downtime-hosting-migration
...
Reinstating the 2 task model for API submitted notifications.
2017-03-27 13:54:43 +01:00
Rebecca Law
37a5ce601a
Update the version of notifications-utils.
...
There was a problem with the address block for the DVLATemplate.
Added a countdown to the build_dvla_file.
2017-03-24 15:25:02 +00:00
Martyn Inglis
4b60c8dada
Fixed faoiling jenkins tests. Mocked the required functions
2017-03-23 15:05:56 +00:00
Martyn Inglis
1c154c4113
Reinstating the 2 task model for API submitted notifications.
...
This is being done for the PaaS migration to allow us to keep traffic coming in whilst we migrate the database.
uses the same tasks as the CSV uploaded notifications. Simple changes to not persist the notification, and call into a different task.
2017-03-23 14:41:00 +00:00
Ken Tsang
50db538df7
Updated schema to remove redundant 'content'
2017-03-23 11:50:15 +00:00
Ken Tsang
41f82c0aef
Refactored tests to use fake_uuid
2017-03-22 14:31:16 +00:00
Ken Tsang
ecbe87a0d6
Added letter preview
2017-03-22 14:22:26 +00:00
Ken Tsang
b81d789307
Add preview endpoint and tests
2017-03-22 10:11:31 +00:00
Ken Tsang
fbcea9c777
Refactored test for optionals
2017-03-22 10:10:06 +00:00
Ken Tsang
8d63f8d9d3
Refactored get template test
2017-03-22 10:10:06 +00:00
Ken Tsang
fad67e1bdd
Added schemas + tests & updated get template tests
2017-03-22 10:10:05 +00:00
Rebecca Law
37293b6c7a
Added a test to ensure that all blueprints have a registered before_request method.
...
Added a test for the status endpoint.
2017-03-17 16:21:41 +00:00
Rebecca Law
e4e7a99f40
Merge branch 'master' into secure-endpoints
...
Conflicts:
app/__init__.py
2017-03-17 10:24:12 +00:00
Rebecca Law
502191f500
Merge pull request #860 from alphagov/create-dvla-file
...
Create dvla file for a letter job
2017-03-17 10:21:46 +00:00
Rebecca Law
78242812ef
Register a before_request event for all blueprints, that defines the authentication requirement.
...
There are three authentication methods:
- requires_no_auth - public endpoint that does not require an Authorisation header
- requires_auth - public endpoints that need an API key in the Authorisation header
- requires_admin_auth - private endpoint that requires an Authorisation header which contains the API key for the defined as the client admin user
2017-03-16 18:15:49 +00:00
Rebecca Law
f880604c85
First attempt at securing the endpoints.
...
Started with adding a before_request event to the service_blueprint, which executes the requires_admin_auth method rather than the require_auth method.
Obviously this is not done but want to get this in front of people to get an opinion.
2017-03-16 10:42:45 +00:00
Ken Tsang
ea8a3754a0
Updated schema to handle null updated_at
2017-03-15 15:48:28 +00:00
Rebecca Law
140179b4b6
Create new task to build dvla file.
...
This will transform each notification in a job to a row in a file.
The file is then uploaded to S3.
The files will later be aggregated by the notifications-ftp app to send to dvla.
The method to upload the file to S3 should be pulled into notifications-utils package.
It is the same method used in notifications-admin.
2017-03-15 15:26:58 +00:00
Ken Tsang
7558a7661a
Updated schema description
2017-03-15 09:19:56 +00:00
Ken Tsang
a596a1bb87
Refactored tests and get template endpoint
2017-03-14 17:51:30 +00:00
Ken Tsang
9e4b1b2bfc
Add schemas, endpoints and supporting tests
2017-03-14 15:40:38 +00:00
Rebecca Law
ea4214c7d5
Added a jobs_dao method to answer if the all the notifications have been created in the database for the given job.
2017-03-14 10:50:09 +00:00
Chris Hill-Scott
761ff86591
Merge pull request #853 from alphagov/ignore-additional-personalisation
...
Quietly ignore extra personalisation
2017-03-10 16:16:27 +00:00
imdadahad
c11f4b5d5d
Merge pull request #829 from alphagov/feat-add-endpoint-for-service-monthly-usage-stats
...
Add endpoint for service monthly usage stats by template
2017-03-09 16:12:22 +00:00
Imdad Ahad
ed8dcf5fa1
Refactor schemas and add tests to ensure user is returned on provider schema
...
dump
2017-03-09 08:43:44 +00:00
imdadahad
7b110d9ae4
Merge pull request #851 from alphagov/feat-add-who-updated-providers
...
Store who updated providers
2017-03-08 16:23:44 +00:00
Imdad Ahad
a4dc614ef7
Restore dao_create_template and use custom template fixture instead
2017-03-08 13:03:44 +00:00
Imdad Ahad
36d52c6e42
Add template type to response and refactor
2017-03-08 12:01:38 +00:00
Imdad Ahad
520c588d56
Add endpoint to retreive stats for service by template per month
2017-03-08 12:01:38 +00:00