1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

fix: Lint Python code with ruff (#3799)

This commit is contained in:
Christian Clauss 2024-08-12 17:09:30 +02:00 committed by GitHub
parent 65ece35966
commit 432914e310
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 112 additions and 120 deletions

View file

@ -40,7 +40,7 @@ def test_get_all_users_admin(
assert response.status_code == 200
# assert all users from all groups are returned
response_user_ids = set(user["id"] for user in response.json()["items"])
response_user_ids = {user["id"] for user in response.json()["items"]}
for user_id in user_ids:
assert user_id in response_user_ids
@ -73,7 +73,7 @@ def test_get_all_group_users(
user_group = database.groups.get_by_slug_or_id(user.group_id)
assert user_group
same_group_user_ids: set[str] = set([str(user.user_id)])
same_group_user_ids: set[str] = {user.user_id}
for _ in range(random_int(2, 5)):
new_user = database.users.create(
{
@ -89,7 +89,7 @@ def test_get_all_group_users(
response = api_client.get(api_routes.users_group_users, params={"perPage": -1}, headers=user.token)
assert response.status_code == 200
response_user_ids = set(user["id"] for user in response.json()["items"])
response_user_ids = {user["id"] for user in response.json()["items"]}
# assert only users from the same group are returned
for user_id in other_group_user_ids: