mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
feat(backend): ✨ refactor/fix group management for admins (#838)
* fix(frontend): 🐛 update dialog implementation to simplify state management * test(backend): ✅ refactor test fixtures + admin group tests * chore(backend): 🔨 add launcher.json for python debugging (tests) * fix typing * feat(backend): ✨ refactor/fix group management for admins * feat(frontend): ✨ add/fix admin group management * add LDAP checker Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
0db8a58963
commit
791aa8c610
52 changed files with 881 additions and 331 deletions
|
@ -1,14 +1,14 @@
|
|||
def assert_ignore_keys(dict1: dict, dict2: dict, ignore_keys: list) -> None:
|
||||
def assert_ignore_keys(dict1: dict, dict2: dict, ignore_keys: list = None) -> None:
|
||||
"""
|
||||
Itterates through a list of keys and checks if they are in the the provided ignore_keys list,
|
||||
if they are not in the ignore_keys list, it checks the value of the key in the provided against
|
||||
the value provided in dict2. If the value of the key in dict1 is not equal to the value of the
|
||||
key in dict2, The assertion fails. Useful for testing id / group_id agnostic data
|
||||
|
||||
Note: ignore_keys defaults to ['id', 'group_id']
|
||||
Note: ignore_keys defaults to ['id', 'group_id', 'groupId']
|
||||
"""
|
||||
if ignore_keys is None:
|
||||
ignore_keys = ["id", "group_id"]
|
||||
ignore_keys = ["id", "group_id", "groupId"]
|
||||
|
||||
for key, value in dict1.items():
|
||||
if key in ignore_keys:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue