diff --git a/tests/api2/test_api_key.py b/tests/api2/test_api_key.py index d9cdc7370e63d..cd55ab4a3d632 100644 --- a/tests/api2/test_api_key.py +++ b/tests/api2/test_api_key.py @@ -98,10 +98,7 @@ def test_api_key_auth_session_list_terminate(): sessions = call("auth.sessions") my_sessions = [] for s in sessions: - if ( - s["credentials"] == "API_KEY" - and s["credentials_data"]["api_key"]["name"] == "Test API Key" - ): + if s["credentials"] == "API_KEY" and s["credentials_data"]["api_key"]["name"] == "Test API Key": my_sessions.append(s) assert len(my_sessions) == 1, sessions call("auth.terminate_session", my_sessions[0]["id"])