From 273548411bfb9d008c8b25aaeaf62e38fe0bf1b4 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 9 Nov 2022 19:57:16 +0100 Subject: [PATCH] Removed tests #26 --- kdb-bot/src/modules/stats/test/__init__.py | 0 kdb-bot/src/modules/stats/test/user_xp_asc.py | 37 ------------------- .../src/modules/stats/test/user_xp_desc.py | 37 ------------------- 3 files changed, 74 deletions(-) delete mode 100644 kdb-bot/src/modules/stats/test/__init__.py delete mode 100644 kdb-bot/src/modules/stats/test/user_xp_asc.py delete mode 100644 kdb-bot/src/modules/stats/test/user_xp_desc.py diff --git a/kdb-bot/src/modules/stats/test/__init__.py b/kdb-bot/src/modules/stats/test/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/kdb-bot/src/modules/stats/test/user_xp_asc.py b/kdb-bot/src/modules/stats/test/user_xp_asc.py deleted file mode 100644 index 9ee1219e..00000000 --- a/kdb-bot/src/modules/stats/test/user_xp_asc.py +++ /dev/null @@ -1,37 +0,0 @@ -from cpl_discord.container import Guild -from cpl_query.extension import List - -from bot_data.model.auto_role import AutoRole -from bot_data.model.client import Client -from bot_data.model.known_user import KnownUser -from bot_data.model.level import Level -from bot_data.model.server import Server -from bot_data.model.user import User -from bot_data.model.user_joined_server import UserJoinedServer -from bot_data.model.user_joined_voice_channel import UserJoinedVoiceChannel -from modules.stats.model.statistic_result import StatisticResult - - -async def user_xp_asc( - auto_roles: List[AutoRole], - clients: List[Client], - known_users: List[KnownUser], - levels: List[Level], - servers: List[Server], - user_joined_servers: List[UserJoinedServer], - user_joined_voice_channel: List[UserJoinedVoiceChannel], - users: List[User], - guild: Guild -) -> StatisticResult: - result = StatisticResult() - result.header.append('Name') - result.header.append('XP') - - for user in users.order_by(lambda u: u.xp): - row = List(str) - member = guild.get_member(user.discord_id) - row.append(member.name) - row.append(str(user.xp)) - result.values.append(row) - - return result diff --git a/kdb-bot/src/modules/stats/test/user_xp_desc.py b/kdb-bot/src/modules/stats/test/user_xp_desc.py deleted file mode 100644 index 32cd0f3e..00000000 --- a/kdb-bot/src/modules/stats/test/user_xp_desc.py +++ /dev/null @@ -1,37 +0,0 @@ -from cpl_discord.container import Guild -from cpl_query.extension import List - -from bot_data.model.auto_role import AutoRole -from bot_data.model.client import Client -from bot_data.model.known_user import KnownUser -from bot_data.model.level import Level -from bot_data.model.server import Server -from bot_data.model.user import User -from bot_data.model.user_joined_server import UserJoinedServer -from bot_data.model.user_joined_voice_channel import UserJoinedVoiceChannel -from modules.stats.model.statistic_result import StatisticResult - - -async def user_xp_desc( - auto_roles: List[AutoRole], - clients: List[Client], - known_users: List[KnownUser], - levels: List[Level], - servers: List[Server], - user_joined_servers: List[UserJoinedServer], - user_joined_voice_channel: List[UserJoinedVoiceChannel], - users: List[User], - guild: Guild -) -> StatisticResult: - result = StatisticResult() - result.header.append('Name') - result.header.append('XP') - - for user in users.order_by_descending(lambda u: u.xp): - row = List(str) - member = guild.get_member(user.discord_id) - row.append(member.name) - row.append(str(user.xp)) - result.values.append(row) - - return result