Commit Graph

12 Commits

Author SHA1 Message Date
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Ryan Ahearn
82df01653f Update tests to focus on US numbers 2023-01-05 11:06:12 -05:00
Ben Thorner
0312e2a528 Split generating authorization headers by type
In response to [1].

[1]: https://github.com/alphagov/notifications-api/pull/3300#discussion_r681653248
2021-08-04 15:13:52 +01:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
Rebecca Law
3a66027d6a Refactor ApiKeys.secret and ServiceInboundApi.bearer_token to use the same encryption method and get rid of the duplicate code. 2017-06-19 14:32:22 +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
4b60c8dada Fixed faoiling jenkins tests. Mocked the required functions 2017-03-23 15:05:56 +00:00
Paul Craig
7ae427c4ef Use jsonschema validation + remove 'v2' schema
Emualated the validation methods that exist [in the python-client](620e5f7014/integration_test/__init__.py).

The `validate_v0` function loads json schemas from a local
`/schemas` directory, whereas the new `validate` function (which
we're going to use for our v2 API calls) uses the common
`get_notification_response` python schema defined in
"app/v2/notifications/notification_schemas.py".

Removed the new `v2` schema from the last commit as it's no longer
being used.

Also, refactored common code in the GET and POST contract files
so that making requests and converting responses to JSON are
pulled out into common functions.
2016-11-22 13:40:22 +00:00
Martyn Inglis
20ccdab3bd Contract tests mock the new deliver_email|sms tasks 2016-09-28 15:28:45 +01:00
Martyn Inglis
e0d46d821d Merge branch 'master' into delete-csv-file-after-7-days
Conflicts:
	app/notifications/rest.py
2016-09-12 16:33:01 +01:00
Imdad Ahad
41681ac001 Fix mocker syntax issue 2016-09-07 11:17:27 +01:00
Leo Hemsted
c91358673f add POST response tests
assert that the response for emails and sms is formatted as expected

also moved schemas into subdirectory to make folder more legible
2016-08-31 12:33:45 +01:00