Commit Graph

332 Commits

Author SHA1 Message Date
Kenneth Kehl
025a10a906 merge from main 2025-01-16 13:22:38 -08:00
Kenneth Kehl
4965bc2354 change countdown from 30 to 60 seconds for message sends to better match batch insert timing 2025-01-13 13:35:40 -08:00
Kenneth Kehl
bf3fc43e87 fix uuid 2025-01-10 15:06:35 -08:00
Kenneth Kehl
2acd0a87b9 fix uuid 2025-01-10 15:02:43 -08:00
Kenneth Kehl
7794eb29c3 fix uuid 2025-01-10 14:51:40 -08:00
Kenneth Kehl
c6d098743d fix uuid 2025-01-10 14:35:03 -08:00
Kenneth Kehl
6f7c7d2d66 fix uuid 2025-01-10 14:23:03 -08:00
Kenneth Kehl
6bd044e684 fix uuid 2025-01-10 14:03:07 -08:00
Kenneth Kehl
9685b09677 fix tests 2025-01-10 13:51:35 -08:00
Kenneth Kehl
1eea4bb35b fix tests 2025-01-10 13:38:36 -08:00
Kenneth Kehl
8cd0bd81f7 code review feedback 2024-12-19 07:18:14 -08:00
Kenneth Kehl
921eefbb1e add expire times for redis objects 2024-12-04 08:04:34 -08:00
Kenneth Kehl
f694c752d0 add expire times for redis objects 2024-12-04 07:56:00 -08:00
Kenneth Kehl
3aa5732b1d add expire times for redis objects 2024-12-04 07:45:00 -08:00
Kenneth Kehl
7b83ea3a34 fix more 2024-11-14 13:15:06 -08:00
Kenneth Kehl
6d8fdab5a3 fix more sqlalchemy 2024-11-14 11:26:53 -08:00
Kenneth Kehl
4cb360ecb2 fix more 2024-10-30 14:01:04 -07:00
Kenneth Kehl
36251ab95d fix more 2024-10-30 08:54:48 -07:00
Kenneth Kehl
b92253b782 remove query.filters from test_tasks 2024-10-30 08:31:15 -07:00
Kenneth Kehl
431d51dd63 remove query.filters from test_tasks 2024-10-30 08:16:17 -07:00
Kenneth Kehl
b2ed52ffd4 upgrade test queries to sqlalchemy 2.0 2024-10-30 07:41:26 -07:00
Kenneth Kehl
905df17f65 remove datetime.utcnow() 2024-05-23 13:59:51 -07:00
Carlo Costino
99edc88197 Localize notification_utils to the API
This changeset pulls in all of the notification_utils code directly into the API and removes it as an external dependency.  We are doing this to cut down on operational maintenance of the project and will begin removing parts of it no longer needed for the API.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-05-16 10:17:45 -04:00
Kenneth Kehl
0f3cdcf56a fix tests 2024-04-12 09:23:22 -07:00
Kenneth Kehl
b777249b6f merge from main 2024-03-01 13:50:09 -08:00
Cliff Hill
15eeac6367 Reformatting.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:58:22 -05:00
Cliff Hill
6f5f5fb864 Cleaning up "email" from code.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:58:22 -05:00
Cliff Hill
63aa12e4ef More cleanup.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:44:21 -05:00
Cliff Hill
262bd8943a More cleanup.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:44:20 -05:00
Cliff Hill
e0b9ac0827 Even more cleanup.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:34 -05:00
Cliff Hill
43f18eed6a More changes for enums.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:41:57 -05:00
Kenneth Kehl
ed3a356ad1 merge from main and fix some tests 2024-01-19 08:58:24 -08:00
Kenneth Kehl
567dd390b4 fix personalisation 2024-01-18 10:03:35 -08:00
Kenneth Kehl
f9f1013f5b notify-api-742 don't write phone numbers to db 2024-01-16 11:21:24 -08:00
Kenneth Kehl
065009bb7a merge from main and reformat 2023-08-29 16:21:18 -07:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Kenneth Kehl
5a350560d7 notify-api-433b remove research mode 2023-08-25 12:09:00 -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
22f301189a code review feedback remove british fake email addresses 2023-08-16 07:19:18 -07:00
Kenneth Kehl
cbed8b8104 retry 2023-07-12 14:52:40 -07:00
Steven Reilly
ff4190a8eb Remove letters-related code (#175)
This deletes a big ol' chunk of code related to letters. It's not everything—there are still a few things that might be tied to sms/email—but it's the the heart of letters function. SMS and email function should be untouched by this.

Areas affected:

- Things obviously about letters
- PDF tasks, used for precompiling letters
- Virus scanning, used for those PDFs
- FTP, used to send letters to the printer
- Postage stuff
2023-03-02 20:20:31 -05:00
Ryan Ahearn
8a0535fa03 Save normalized phone format to DB 2023-01-06 11:06:23 -05:00
Ryan Ahearn
82df01653f Update tests to focus on US numbers 2023-01-05 11:06:12 -05:00
Ryan Ahearn
041cd08097 Clean up more mmg and firetext references 2022-12-22 09:31:12 -05:00
Ryan Ahearn
17ee4c3f2b Use encrypt/decrypt methods in place of signing 2022-12-12 16:41:04 -05:00
Ryan Ahearn
b553ea4c77 Update uses of encryption.encrypt to more accurate encryption.sign 2022-12-07 14:55:05 -05: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
Leo Hemsted
6181c60f75 remove usage of notify_db fixture in unit tests
* notify_db fixture creates the database connection and ensures the test
  db exists and has migrations applied etc. It will run once per session
  (test run).
* notify_db_session fixture runs after your test finishes and deletes
  all non static (eg type table) data.

In unit tests that hit the database (ie: most of them), 99% of the time
we will need to use notify_db_session to ensure everything is reset. The
only time we don't need to use it is when we're querying things such as
"ensure get X works when database is empty". This is such a low
percentage of tests that it's easier for us to just use
notify_db_session every time, and ensure that all our tests run much
more consistently, at the cost of a small bit of performance when
running tests.

We used to use notify_db to access the session object for manually
adding, committing, etc. To dissuade usage of that fixture I've moved
that to the `notify_db_session`. I've then removed all uses of notify_db
that I could find in the codebase.

As a note, if you're writing a test that uses a `sample_x` fixture, all
of those fixtures rely on notify_db_session so you'll get the teardown
functionality for free. If you're just calling eg `create_x` db.py
functions, then you'll need to make you add notify_db_session fixture to
your test, even if you aren't manually accessing the session.
2022-05-04 11:36:54 +01:00
Chris Hill-Scott
7f72d3a60f Bump utils to 53.0.0
Changes:

53.0.0
---

* `notifications_utils.columns.Columns` has moved to
  `notifications_utils.insensitive_dict.InsensitiveDict`
* `notifications_utils.columns.Rows` has moved to
  `notifications_utils.recipients.Rows`
* `notifications_utils.columns.Cell` has moved to
  `notifications_utils.recipients.Cell`

52.0.0
---

* Deprecate the following unused `redis_client` functions:
  - `redis_client.increment_hash_value`
  - `redis_client.decrement_hash_value`
  - `redis_client.get_all_from_hash`
  - `redis_client.set_hash_and_expire`
  - `redis_client.expire`

51.3.1
---

* Bump govuk-bank-holidays to cache holidays for next year.
2022-02-08 09:45:10 +00:00