🐛(linting) fix linting errors arising from Ruff update

This update affects assertion messages in particular.
This commit is contained in:
Laurent Bossavit
2025-01-20 13:58:02 +01:00
committed by Laurent Bossavit
parent 3f990e93b7
commit 914554e45c
3 changed files with 10 additions and 13 deletions

View File

@@ -192,9 +192,9 @@ def test_api_teams_order_param(client, force_login_via_resource_server):
response_data = response.json() response_data = response.json()
response_team_ids = [team["id"] for team in response_data["results"]] response_team_ids = [team["id"] for team in response_data["results"]]
assert ( assert response_team_ids == team_ids, (
response_team_ids == team_ids "created_at values are not sorted from oldest to newest"
), "created_at values are not sorted from oldest to newest" )
def test_api_teams_list_with_parent_teams(client, force_login_via_resource_server): def test_api_teams_list_with_parent_teams(client, force_login_via_resource_server):

View File

@@ -95,9 +95,9 @@ def test_api_teams_order():
response_team_ids = [team["id"] for team in response_data] response_team_ids = [team["id"] for team in response_data]
team_ids.reverse() team_ids.reverse()
assert ( assert response_team_ids == team_ids, (
response_team_ids == team_ids "created_at values are not sorted from newest to oldest"
), "created_at values are not sorted from newest to oldest" )
def test_api_teams_order_param(): def test_api_teams_order_param():
@@ -122,9 +122,9 @@ def test_api_teams_order_param():
response_data = response.json() response_data = response.json()
response_team_ids = [team["id"] for team in response_data] response_team_ids = [team["id"] for team in response_data]
assert ( assert response_team_ids == team_ids, (
response_team_ids == team_ids "created_at values are not sorted from oldest to newest"
), "created_at values are not sorted from oldest to newest" )
@pytest.mark.parametrize( @pytest.mark.parametrize(

View File

@@ -119,10 +119,7 @@ def test_commands_setup_dimail_db(settings):
assert ( assert (
f"{DIMAIL_URL}/users/", f"{DIMAIL_URL}/users/",
( (b'{"name": "sub.toto.123", "password": "no", "is_admin": false, "perms": []}'),
b'{"name": "sub.toto.123", "password": "no", "is_admin": false, '
b'"perms": []}'
),
) in dimail_calls ) in dimail_calls
assert ( assert (