Add test for term start.
This commit is contained in:
+35
-5
@@ -61,7 +61,11 @@ class TestCog(commands.Cog, name="Test commands."):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
config: DakinyConfig = self.bot.config
|
config: DakinyConfig = self.bot.config
|
||||||
cycle = ElectionCycle(get_current_cycle(config), config, self.bot.get_guild(config.params.guild_id))
|
cycle = ElectionCycle(
|
||||||
|
get_current_cycle(config),
|
||||||
|
config,
|
||||||
|
self.bot.get_guild(config.params.guild_id),
|
||||||
|
)
|
||||||
await cycle.election_start_action()
|
await cycle.election_start_action()
|
||||||
|
|
||||||
@test.subcommand()
|
@test.subcommand()
|
||||||
@@ -73,7 +77,11 @@ class TestCog(commands.Cog, name="Test commands."):
|
|||||||
interaction (nextcord.Interaction): _description_
|
interaction (nextcord.Interaction): _description_
|
||||||
"""
|
"""
|
||||||
config: DakinyConfig = self.bot.config
|
config: DakinyConfig = self.bot.config
|
||||||
cycle = ElectionCycle(get_current_cycle(config), config, self.bot.get_guild(config.params.guild_id))
|
cycle = ElectionCycle(
|
||||||
|
get_current_cycle(config),
|
||||||
|
config,
|
||||||
|
self.bot.get_guild(config.params.guild_id),
|
||||||
|
)
|
||||||
await cycle.voting_start_action()
|
await cycle.voting_start_action()
|
||||||
|
|
||||||
@test.subcommand()
|
@test.subcommand()
|
||||||
@@ -85,17 +93,39 @@ class TestCog(commands.Cog, name="Test commands."):
|
|||||||
interaction (nextcord.Interaction): _description_
|
interaction (nextcord.Interaction): _description_
|
||||||
"""
|
"""
|
||||||
config: DakinyConfig = self.bot.config
|
config: DakinyConfig = self.bot.config
|
||||||
cycle = ElectionCycle(get_current_cycle(config), config, self.bot.get_guild(config.params.guild_id))
|
cycle = ElectionCycle(
|
||||||
|
get_current_cycle(config),
|
||||||
|
config,
|
||||||
|
self.bot.get_guild(config.params.guild_id),
|
||||||
|
)
|
||||||
await cycle.voting_end_action()
|
await cycle.voting_end_action()
|
||||||
|
|
||||||
@test.subcommand()
|
@test.subcommand()
|
||||||
async def election_reminder(self, interaction: nextcord.Interaction):
|
async def election_reminder(self, interaction: nextcord.Interaction):
|
||||||
config: DakinyConfig = self.bot.config
|
config: DakinyConfig = self.bot.config
|
||||||
cycle = ElectionCycle(get_current_cycle(config), config, self.bot.get_guild(config.params.guild_id))
|
cycle = ElectionCycle(
|
||||||
|
get_current_cycle(config),
|
||||||
|
config,
|
||||||
|
self.bot.get_guild(config.params.guild_id),
|
||||||
|
)
|
||||||
await cycle.election_reminder()
|
await cycle.election_reminder()
|
||||||
|
|
||||||
@test.subcommand()
|
@test.subcommand()
|
||||||
async def daily(self, interaction: nextcord.Interaction):
|
async def daily(self, interaction: nextcord.Interaction):
|
||||||
config: DakinyConfig = self.bot.config
|
config: DakinyConfig = self.bot.config
|
||||||
cycle = ElectionCycle(get_current_cycle(config), config, self.bot.get_guild(config.params.guild_id))
|
cycle = ElectionCycle(
|
||||||
|
get_current_cycle(config),
|
||||||
|
config,
|
||||||
|
self.bot.get_guild(config.params.guild_id),
|
||||||
|
)
|
||||||
await cycle.check_date()
|
await cycle.check_date()
|
||||||
|
|
||||||
|
@test.subcommand()
|
||||||
|
async def term_start(self, interaction: nextcord.Interaction):
|
||||||
|
config: DakinyConfig = self.bot.config
|
||||||
|
cycle = ElectionCycle(
|
||||||
|
get_current_cycle(config),
|
||||||
|
config,
|
||||||
|
self.bot.get_guild(config.params.guild_id),
|
||||||
|
)
|
||||||
|
await cycle.term_start_action()
|
||||||
|
|||||||
Reference in New Issue
Block a user