def setUp(self): setup_plugin() setup_cvars({ "qlx_owner": "1234567890", "qlx_discordBotToken": "bottoken", "qlx_discordRelayChannelIds": "1234", "qlx_discordTriggeredChannelIds": "456, 789", "qlx_discordUpdateTopicOnTriggeredChannels": "1", "qlx_discordKeepTopicSuffixChannelIds": "1234, 456", "qlx_discordKeptTopicSuffixes": "{1234: '', 456: ''}", "qlx_discordUpdateTopicInterval": "305", "qlx_discordTriggerTriggeredChannelChat": "trigger", "qlx_discordCommandPrefix": "%", "qlx_discordTriggerStatus": "minqlx", "qlx_discordMessagePrefix": "[DISCORD]", "qlx_discordEnableHelp": "1", "qlx_discordEnableVersion": "1", "qlx_displayChannelForDiscordRelayChannels": "0", "qlx_discordReplaceMentionsForRelayedMessages": "0", "qlx_discordReplaceMentionsForTriggeredMessages": "1", "qlx_discordAdminPassword": "******", "qlx_discordAuthCommand": "auth", "qlx_discordExecPrefix": "exec", "qlx_discordLogToSeparateLogfile": "0", "qlx_discordTriggeredChatMessagePrefix": "", "qlx_discordRelayTeamchatChannelIds": "242", "qlx_discord_extensions": "" }) self.logger = mock(spec=logging.Logger, strict=False) self.discord = SimpleAsyncDiscord("version information", self.logger) self.setup_discord_library()
def setUp(self): setup_plugin() setup_cvars({ "qlx_balanceUseLocal": "0", }) setup_game_in_progress() connected_players() self.plugin = balance()
def setUp(self): setup_plugin() setup_game_in_warmup("ca") connected_players() self.discord = mock(spec=SimpleAsyncDiscord, strict=False) setup_cvars({ "qlx_discordQuakeRelayMessageFilters": r"^\!s$, ^\!p$" }) self.plugin = mydiscordbot(discord_client=self.discord)
def setUp(self): setup_plugin() setup_cvars({ "qlx_rebalanceScoreDiffThreshold": "3", "qlx_rebalanceWinningStreakThreshold": "3", "qlx_rebalanceNumAnnouncements": "2" }) setup_game_in_progress() connected_players() self.plugin = auto_rebalance()
def setUp(self): setup_plugin() setup_cvars({ "qlx_modeVoteNewMapDefault": "vql", }) spy2(Plugin.callvote) spy2(minqlx.console_command) spy2(minqlx.client_command) self.plugin = custom_modes_vote()
def setUp(self): setup_plugin() setup_cvars({ "qlx_qlstatsPrivacyKick": "0", "qlx_qlstatsPrivacyBlock": "0", "qlx_qlstatsPrivacyWhitelist": "public, anonymous", "qlx_qlstatsPrivacyJoinAttempts": "5" }) setup_game_in_progress() self.setup_balance_playerprivacy([]) self.plugin = qlstats_privacy_policy()
def setUp(self): setup_plugin() setup_cvars({ "qlx_fastvoteTypes": "map", "qlx_fastvoteStrategy": "threshold", "qlx_fastvoteThresholdFastPassDiff": "6", "qlx_fastvoteThresholdFastFailDiff": "5", "qlx_fastvoteParticipationPercentage": "0.67" }) spy2(Plugin.force_vote) spy2(Plugin.current_vote_count) self.plugin = fastvotes()
def setUp(self): setup_plugin() setup_cvars({"qlx_fragstats_toplimit": "10"}) setup_game_in_progress() self.plugin = frag_stats() self.reply_channel = mocked_channel() self.plugin.database = Redis self.db = mock(StrictRedis) self.plugin._db_instance = self.db # pylint: disable=protected-access when(self.db).zincrby(any_, any_, any_).thenReturn(None) when(self.db).zincrby(any_, any_, any_).thenReturn(None) when(self.db).set(any_, any_).thenReturn(None)
def setUp(self): setup_plugin() setup_cvars({ "zmq_stats_enable": "1", "qlx_autoready_min_players": "10", "qlx_autoready_autostart_delay": "180", "qlx_autoready_min_seconds": "30", "qlx_autoready_timer_visible": "60", "qlx_autoready_disable_manual_readyup": "0" }) self.mapname = "campgrounds" setup_game_in_warmup(game_type="ca", mapname=self.mapname) self.plugin = autoready.autoready() self.timer = mock(CountdownThread) when(self.timer).start().thenReturn(None) when(self.timer).stop().thenReturn(None) when(autoready).CountdownThread( any_(int), timed_actions=any_(dict)).thenReturn(self.timer)
def setUp(self): setup_plugin() self.warner = thirtysecwarn() setup_cvars({"qlx_thirtySecondWarnAnnouncer": "standard"})