Commit Graph

16 Commits

Author SHA1 Message Date
samathad2023
c3bb44129c tests and orderedset updates for 3.12 upgrade 2024-03-08 15:00:48 -08:00
Kenneth Kehl
8c9721d8e2 notify-api-412 use black to enforce python coding style 2023-08-25 09:12:23 -07:00
jimmoffet
69abec0bb3 change dashboard test to reflect demo changes to uploads view 2022-09-09 17:02:48 -07:00
jimmoffet
b465131338 all tests passing 2022-08-05 01:22:32 -07:00
Leo Hemsted
8ec9fe96a9 Delete new format template cache when moving folders 2020-10-06 09:47:22 +01:00
Katie Smith
123b769771 Change code order for Redis delete decorator
Before, the delete decorator would delete the keys from Redis and then
we made the request to api to change the data. However, it is possible
that the cache could get re-populated in between these two things
happening, and so would cache outdated data.

This changes the order to send the api request first. We then always
delete the specified keys from Redis. Changing the order of the code in
the decorator changes the order in which the cache keys get deleted, so
the tests have been updated.
2019-07-26 16:29:50 +01:00
Pea Tyczynska
e85969f6fa Change folder viewing permissions from manage folder page 2019-03-18 17:52:02 +00:00
Leo Hemsted
f6367f2278 move (non-api) clients (inc redis) from app/__init__.py to extensions
when clients are defined in app/__init__.py, it increases the chance of 
cyclical imports. By moving module level client singletons out to a 
separate extensions file, we stop cyclical imports, but keep the same 
code flow - the clients are still initialised in `create_app` in 
`__init__.py`.

The redis client in particular is no longer separate - previously redis 
was set up on the `NotifyAdminAPIClient` base class, but now there's one 
singleton in `app.extensions`. This was done so that we can access redis 
from outside of the existing clients.
2019-02-15 11:44:08 +00:00
Leo Hemsted
6743bd11fa moved existing template folder tests into test_template_folders
also refactored slightly to work with new html, and separate succesful
and bad-permissions test cases
2018-11-28 14:14:20 +00:00
Pea Tyczynska
91d309816b Build delete folder endpoint that calls template_folders_api_client 2018-11-15 10:51:44 +00:00
Pea Tyczynska
b5c78dc552 Add delete_folder method to template folder api client 2018-11-15 10:51:44 +00:00
Pea Tyczynska
c27b97380d Add decorator deleting cache for template folder client update method 2018-11-13 11:43:59 +00:00
Chris Hill-Scott
74a4400bc7 Update URLs to match change in API 2018-11-12 08:37:46 +00:00
Chris Hill-Scott
cdb5b47c4d Post to the API when moving folders and templates
This commit adds logic to:
- take the list of selected folders and templates
- split it into two lists (of folders and templates)
- `POST` that data to the API, to effect the movement of said folders
  and templates

I’ve tried to architect it in such a way that we can easily add more
template ‘operations’ in the future, as we add more forms to the choose
template page.
2018-11-12 08:37:46 +00:00
Leo Hemsted
078595da9d show list of template folders on the choose templates page
Not linking anywhere yet. Also not sorted, and not filtered by
parent_id.
2018-11-06 13:13:13 +00:00
Leo Hemsted
7cbf5de240 add new template folder
The add new templates page now has option to add template folders.
Tweaked wording of other options and h1 to clarify options since it's
not all about templates any more.

Added api client and stuff for it
2018-11-06 13:13:12 +00:00