minglis
a8ea333606
Merge pull request #923 from alphagov/validate-int-numbers-on-api
...
Validate International phone numbers
2017-04-27 13:21:04 +01:00
Martyn Inglis
99081488f1
Mock out some SQS calls
2017-04-27 12:47:08 +01:00
Martyn Inglis
84860b2a1d
Adds a debug line to try and debug jenkins
2017-04-27 10:41:31 +01:00
Martyn Inglis
2a0f8c8808
Validate International phone numbers
...
- uses new utils methods to validate phone numbers
- defaults to International=True on validation. This ensures the validator works on all numbers
- Then check if the user can send this message to the number internationally if needed.
2017-04-26 15:56:45 +01:00
Leo Hemsted
02e8f454e1
add new notification status 'sent'
...
for international text messages, when we may not ever receive callback info,
so we need a separate status that doesn't get timed out etc
2017-04-25 17:08:29 +01:00
Ken Tsang
4a63a337b2
Removed slash from v2 get all templates route
2017-04-19 12:38:58 +01:00
Ken Tsang
fc0cfa5dbf
Corrected code to handle template types
2017-04-19 10:51:12 +01:00
Ken Tsang
ed953e992d
Add check for subject when email type
2017-04-19 10:51:12 +01:00
Ken Tsang
5ef0ecf9bf
Added subject to get all templates email template
2017-04-19 10:51:12 +01:00
Ken Tsang
a5e514c356
Refactored to use template response as template
2017-04-19 10:51:12 +01:00
Ken Tsang
d290a2e0ad
Removed paging from get all templates
2017-04-19 10:51:12 +01:00
Ken Tsang
e2ad8ba50d
Renamed get template test
2017-04-19 10:51:12 +01:00
Ken Tsang
cb7cd233d1
Rrefactored schema
2017-04-19 10:51:12 +01:00
Ken Tsang
89e244ccd2
First commit
2017-04-19 10:51:12 +01:00
Ken Tsang
f5da3574b5
Add get all templates schema
2017-04-19 10:51:12 +01:00
Ken Tsang
7c0aeca66e
Removed unused imports
2017-04-11 16:19:43 +01:00
Ken Tsang
06ec7a59a6
Refactored code to personalise subject
2017-04-11 16:19:43 +01:00
Ken Tsang
eba88b08c5
Removed URI from preview response
2017-04-11 16:19:43 +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
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
9ee26e0b67
Revert "update notification rest tests"
...
This reverts commit 11919d9810 .
2017-03-30 10:38:51 +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
11919d9810
update notification rest tests
2017-03-28 13:51:42 +01: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
Ken Tsang
ea8a3754a0
Updated schema to handle null updated_at
2017-03-15 15:48:28 +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
f66670c558
- Added logging to indicate that we created the notification and that we sent the notification to a delivery queue.
...
- Small updates as recommended by review comments.
2017-01-18 09:56:26 +00:00
Rebecca Law
b34c5f0bcd
If the template.process_type = PRIROITY send the message to the notify queue.
...
We are using the notify queue in this iteration because that queue is a low volume queue with it's own dedicated workers. This just saves us from building a new queue at this point, and a new queue may not be necessary.
2017-01-17 13:16:26 +00:00
Rebecca Law
a8cdabcecd
- Refactor v2 post_notification to use a single method for sms and email.
...
- Added the `simulate` notification logic to version 2. We have 3 email addresses and phone numbers that are used
to simulate a successful post to /notifications. This was missed out of the version 2 endpoint.
- Added a test to template_dao to check for the default value of normal for new templates
- in v2 get_notifications, casted the path param to a uuid, if not uuid abort(404)
2017-01-17 12:08:24 +00:00
Leo Hemsted
501187a9f4
bump utils to 13.0.1
...
brings in a fix to InvalidEmail/Phone/AddressExceptions not being
instantiated correctly. `exception.message` is not a python standard,
so we shouldn't be relying on it to transmit exception reasons -
rather we should be using `str(exception)` instead. This involved a
handful of small changes to the schema validation
2017-01-09 16:37:58 +00:00
Rebecca Law
bbdbb9079e
Fixed the template uri for the post notification responses.
...
It was optimistic to think the v2 templates would be complete.
2017-01-04 11:22:50 +00:00
Rebecca Law
7f9111fd90
Removed the oneOf validation in the get_notification_response schema.
2017-01-04 11:00:47 +00:00
imdadahad
fb114f4c80
Merge pull request #772 from alphagov/fix-v2-uri
...
Fix uri validation in v2 responses
2016-12-16 15:53:26 +00:00
Imdad Ahad
243c4e481f
Add uri validation to response schemas:
...
* Add to root uri and template.uri in responses
* Add tests to validate invalid or missing uri
* General refactoring for clarity
2016-12-15 16:39:15 +00:00
Imdad Ahad
7634c2e772
Add robustness to our v2 schema error messages:
...
* Ensure we dont raise exception if e.cause does not contain a message
* Ensure we handle case where e.path may be empty
* Refactor existing tests to conform to new format
2016-12-15 16:39:15 +00:00
Rebecca Law
db6db2e121
Renamed test, it was a duplicate name
2016-12-15 16:30:38 +00:00
Rebecca Law
7a623de171
Added boby and subject to the get_notifications schema
2016-12-15 16:19:55 +00:00
Chris Hill-Scott
2c9a3f6f57
Merge pull request #764 from alphagov/more-breaking-utils-changes
...
Update utils to 12.1.1
2016-12-14 17:46:15 +01:00
Chris Hill-Scott
59af44d7ab
Update utils to 12.0.0
...
Includes:
- [x] https://github.com/alphagov/notifications-utils/pull/94 (breaking
changes which are responsible for all the changes to the API in
this PR)
The test for `get_sms_fragment_count` has been removed because this
method is already tested in utils here:
ac20f7e99e/tests/test_base_template.py (L140-L159)
2016-12-13 10:57:01 +00:00
Imdad Ahad
52130e8ba4
Refactor tests
2016-12-12 18:06:14 +00:00
Rebecca Law
4f9b295a5b
Merge pull request #766 from alphagov/fix-sms-sender
...
Fix the from number in the post_sms_response.
2016-12-12 16:46:00 +00:00