Commit Graph

153 Commits

Author SHA1 Message Date
Kenneth Kehl
23961a3e66 more tests 2025-07-07 13:38:11 -07:00
Kenneth Kehl
71fb38fb51 more tests 2025-07-07 12:53:31 -07:00
Kenneth Kehl
53af3ed126 more tests 2025-07-07 12:27:11 -07:00
Kenneth Kehl
f14c6c7ab1 more tests 2025-07-07 12:06:18 -07:00
Kenneth Kehl
56685f4d0f more tests 2025-07-07 11:55:30 -07:00
Kenneth Kehl
1dc68080bb code review feedback 2025-07-07 07:53:51 -07:00
Kenneth Kehl
764ced6bd8 more tests 2025-07-03 08:24:33 -07:00
Kenneth Kehl
ec89b1afa7 more tests 2025-07-03 08:15:42 -07:00
Kenneth Kehl
768b5b029d more tests 2025-07-03 08:06:33 -07:00
Kenneth Kehl
8bb631ab46 more tests 2025-07-03 08:01:41 -07:00
Kenneth Kehl
28444a460b fix test 2025-04-03 08:16:33 -07:00
Kenneth Kehl
4846c96505 track message costs 2025-02-28 09:29:43 -08:00
Kenneth Kehl
c05ec18b11 track message costs 2025-02-28 09:16:06 -08:00
Kenneth Kehl
9f3aec755f add tests 2024-12-26 09:23:00 -08:00
Kenneth Kehl
8579efccbc add placehodler for new test 2024-12-26 08:50:26 -08:00
Kenneth Kehl
85e100febe fix 2024-12-13 17:40:28 -08:00
Kenneth Kehl
905df17f65 remove datetime.utcnow() 2024-05-23 13:59:51 -07:00
Cliff Hill
a118b16eb8 Replaced "delivered".
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:58:22 -05:00
Kenneth Kehl
467a2919f4 add log warning in dev environment if phone number is opted out (notify-api-539) 2024-02-13 09:39:53 -08:00
Cliff Hill
d714ebcd5d Restructured how clients are implemented.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-01-04 09:00:41 -05:00
Kenneth Kehl
9c841320ca fix tests 2023-11-03 08:28:21 -07:00
Carlo Costino
490893397e Fixed isinstance() calls, oops
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-10-30 16:30:06 -04:00
Carlo Costino
8c825a43bd Updated a couple more dependencies and fix flake8 warnings
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-10-30 16:16:49 -04:00
Kenneth Kehl
679dee8123 fix tests 2023-10-03 08:00:59 -07:00
Kenneth Kehl
f1a4516c9e notify-api-360 stop worrying about aws regions 2023-09-27 08:57:00 -07:00
Kenneth Kehl
309c49dc84 notify-api-360 messages are hanging in pending forever 2023-09-26 08:11:47 -07:00
Kenneth Kehl
00fd3a72bb code review feedback, fix setup.cfg and reformat 2023-08-25 08:10:33 -07:00
Kenneth Kehl
026dc14021 notify-api-412 use black to enforce python style standards 2023-08-23 10:35:43 -07:00
Kenneth Kehl
f2f0e5a0f1 code review feedback 2023-08-15 14:50:41 -07:00
Kenneth Kehl
85604e5394 more tests 2023-08-11 11:47:57 -07:00
Kenneth Kehl
6b83d7a55a fix flake8 2023-07-21 11:32:31 -07:00
Kenneth Kehl
89b733dd54 fix flake8 2023-07-21 11:24:22 -07:00
Kenneth Kehl
6fa4c05adf fix flake8 2023-07-21 10:42:17 -07:00
Kenneth Kehl
6e597aafad notify-34 fix skipped tests 2023-05-18 09:46:36 -07:00
Kenneth Kehl
1e72f97b17 code review feedback 2023-05-09 08:45:51 -07:00
Kenneth Kehl
7892c52d11 fix tests 2023-05-04 08:15:08 -07:00
Kenneth Kehl
3fb113a83e notify-152 sms delivery receipts 2023-05-04 07:56:24 -07:00
Kenneth Kehl
001954538e notify-243 remove statsd 2023-04-25 07:50:56 -07:00
Ryan Ahearn
84e7e9b5cf Use credentials output by terraform/development 2023-03-13 13:44:10 -04:00
Ryan Ahearn
28f8649444 Use sns credentials from VCAP_SERVICES 2023-02-28 16:50:00 -05:00
Steven Reilly
d37c2a53b8 Merge branch 'main' into stvnrlly-remove-broadcasts 2022-10-25 10:17:49 -04:00
stvnrlly
e9fdfd59f4 clean flake8 except provider code 2022-10-19 16:16:26 +00:00
stvnrlly
57f4df8ed1 remove broadcast-related code, except migrations 2022-10-04 15:28:27 +00:00
Christa Hartsock
af6495cd4c Get tests passing locally
When we cloned the repository and started making modifications, we
didn't initially keep tests in step. This commit tries to get us to a
clean test run by skipping tests that are failing and removing some
that we no longer expect to use (MMG, Firetext), with the intention that
we will come back in future and update or remove them as appropriate.

To find all tests skipped, search for `@pytest.mark.skip(reason="Needs
updating for TTS:`. There will be a brief description of the work that
needs to be done to get them passing, if known. Delete that line to make
them run in a standard test run (`make test`).
2022-07-07 15:41:15 -07:00
Jim Moffet
aa4ec532a4 implement SNS 2022-06-17 11:16:23 -07:00
Ben Thorner
c27107fa74 Remove support for Reach provider
This provider was never active and support was never completed, so
there's little value in keeping all this potentially confusing code.
2022-04-29 12:28:08 +01:00
Ben Thorner
44d90b0a4f Remove redundant ternary on SMS client FROM_NUMBER
Logs over the past 14 days confirm we never call this code with
None as the sender, so it's safe to remove the ternary.
2022-04-12 14:59:21 +01:00
Ben Thorner
7d92a0869a Remove per-client SMS exception classes
In response to: [^1].

The stacktrace conveys the same and more information. We don't do
anything different for each exception class, so there's no value
in having three of them over one exception.

I did think about DRYing-up the duplicate exception behaviour into
the base class one. This isn't ideal because the base class would
be making assumptions about how inheriting classes make requests,
which might change with future providers. Although it might be nice
to have more info in the top-level message, we'll still get it in
the stacktrace e.g.

    ValueError: Expected 'code' to be '0'
    During handling of the above exception, another exception occurred:
    app.clients.sms.SmsClientResponseException: SMS client error (Invalid response JSON)

    requests.exceptions.ReadTimeout
    During handling of the above exception, another exception occurred:
    app.clients.sms.SmsClientResponseException: SMS client error (Request failed)

[^1]: https://github.com/alphagov/notifications-api/pull/3493#discussion_r837363717
2022-03-30 13:38:50 +01:00
Ben Thorner
8432be4fc1 Add missing test for invalid Firetext JSON
This is already tested for MMG (and Reach).
2022-03-30 13:38:49 +01:00
Ben Thorner
a2e1d03009 Require "sender" argument to send_sms method
In response to [^1].

[^1]: https://github.com/alphagov/notifications-api/pull/3493#discussion_r836616675
2022-03-30 13:38:48 +01:00