From dfe99373ed4aa2edb236082c91fccdb57cb6434b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 13 May 2024 15:52:57 +0200 Subject: [PATCH] Fixup setup_users in celery rate limit integration test --- lib/tool_shed/managers/api_keys.py | 5 ++++- test/integration/test_celery_user_rate_limit.py | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/tool_shed/managers/api_keys.py b/lib/tool_shed/managers/api_keys.py index d38ed6b1a537..9f66c9512b45 100644 --- a/lib/tool_shed/managers/api_keys.py +++ b/lib/tool_shed/managers/api_keys.py @@ -1,5 +1,8 @@ from galaxy.managers.api_keys import ApiKeyManager -from tool_shed.webapp.model import APIKeys, User +from tool_shed.webapp.model import ( + APIKeys, + User, +) class ToolShedApiKeyManager(ApiKeyManager[APIKeys, User]): diff --git a/test/integration/test_celery_user_rate_limit.py b/test/integration/test_celery_user_rate_limit.py index b9b832c5cddc..1c802015b313 100644 --- a/test/integration/test_celery_user_rate_limit.py +++ b/test/integration/test_celery_user_rate_limit.py @@ -49,8 +49,10 @@ def setup_users(dburl: str, num_users: int = 2): user_ids_to_add = set(expected_user_ids).difference(found_user_ids) for user_id in user_ids_to_add: conn.execute( - text("insert into galaxy_user(id, active, email, password) values (:id, :active, :email, :pw)"), - [{"id": user_id, "active": True, "email": "e", "pw": "p"}], + text( + "insert into galaxy_user(id, active, email, password, username) values (:id, :active, :email, :pw)" + ), + [{"id": user_id, "active": True, "email": "e", "pw": "p", "username": f"u{user_id}"}], )