aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2022-04-21wait_for event param is now positional onlyGravatar Chris Lovering-1/+1
Closes #2139 Closes BOT-33N
2022-04-20Don't call broken ModPings schedulerGravatar Chris Lovering-1/+1
This is being fixed in https://github.com/python-discord/bot/pull/2001
2022-04-20Refactor a try/except that will never raiseGravatar Chris Lovering-6/+5
2022-04-20Automatically determine number threads to use with pytestGravatar Chris Lovering-4/+4
2022-04-20Don't use internal discord.py methods for available help channels messageGravatar Chris Lovering-10/+6
2022-04-20Use fully qualified datetime.time()Gravatar Chris Lovering-2/+2
This is to remove possible confusion with time.time
2022-04-20remove unneeded import in testsGravatar Chris Lovering-1/+0
2022-04-20Remove unneeded contextlib.suppressGravatar Chris Lovering-5/+4
2022-04-20Don't hardcode ! as the bot prefix where possibleGravatar Chris Lovering-13/+16
2022-04-19Pass the now required intents kwarg when creating MockBotGravatar Chris Lovering-0/+1
2022-04-19Utilise new on_thread_create event for modlogGravatar Chris Lovering-6/+1
2022-04-19Bump bot-core for new discord.py versionGravatar Chris Lovering-7/+7
2022-04-19Ensure error has an attr before checking the value in metabaseGravatar Chris Lovering-1/+1
2022-04-19Empty embed descriptions are now None, rather than a sentinalGravatar Chris Lovering-1/+1
2022-04-19channel.history is now an async iterator, so has no .next() methodGravatar Chris Lovering-2/+3
2022-04-19Don't pass unused param to infraction scheduler cog_loadGravatar Chris Lovering-1/+1
2022-04-19Don't schedule a now non-existant taskGravatar Chris Lovering-7/+0
2022-04-19Move api_client to a kwarg on creation of the BotGravatar Chris Lovering-8/+8
2022-04-18Remove old task cancellations from modpings cog_unloadGravatar Chris Lovering-4/+1
2022-04-18Remove unused instance var from OTN cogGravatar Chris Lovering-1/+0
2022-04-18Add missing underscores to test function namesGravatar Chris Lovering-3/+3
2022-04-18Test that sync cog syncers run when sync cog is loadedGravatar Chris Lovering-0/+13
2022-04-18Refactor otn cog to use discord.py tasksGravatar Chris Lovering-35/+30
2022-04-18Use discord.py's async cog loading for more cogsGravatar Chris Lovering-15/+6
In the case of the docs cog, the lock is not needed on the cog_load function as it is ran before the bot even starts listening for commands.
2022-04-18Add cog_unload functions to cancel scheduled tasksGravatar Chris Lovering-0/+12
2022-04-18Hardcode 8 test threads in CIGravatar Chris Lovering-1/+1
This is needed due to the removal of psutil
2022-04-18Move redis session reconnect to bot-coreGravatar Chris Lovering-26/+23
2022-04-18Correct capitalisation of async and discord.pyGravatar Chris Lovering-3/+3
2022-04-18Wait for mod log to load when syncing defcon settingsGravatar Chris Lovering-0/+16
2022-04-18Remove usages of init_task in thread bumper cogGravatar Chris Lovering-8/+0
2022-04-18Don't try to overwrite a read-only attr in help command testGravatar Chris Lovering-1/+1
2022-04-18Remove sync cog init testGravatar Chris Lovering-17/+0
Discord.py now implicitly calls the new async cog_load function from within it's internals on load. There is no longer a need to test that this happens.
2022-04-18Update tests to use new async cog_load functionGravatar Chris Lovering-25/+17
2022-04-18Update tests to use new async cog setup functionGravatar Chris Lovering-29/+28
2022-04-18Update test helpers with breaking d.py changesGravatar Chris Lovering-1/+5
region was removed from the guild object, so this has been replaced with features add_cog is now async, so it is now an async_mock during tests Two new required voice_channel attrs were added channel.type is required to be set to ChannelType due to a new isinstance check in d.py
2022-04-18Adding missing kwargs required by BotBase in test helperGravatar Chris Lovering-0/+3
2022-04-18Remove async stats and site api wrapperGravatar Chris Lovering-229/+22
We now source them from bot-core, so no need to have them here too.
2022-04-18Discord.py breaking changesGravatar Chris Lovering-7/+9
bot.http.send_message and edit_message now require a context manager to handle params. tasks.Loop no longer accepts a loop param on its init.
2022-04-18Use BotBase from bot-coreGravatar Chris Lovering-283/+84
2022-04-18Move to async cog loadingGravatar Chris Lovering-223/+158
2022-04-18Don't use discord.NoMoreItems as it's removedGravatar Chris Lovering-3/+3
This has been removed in favour of Python's built-in StopAsyncIteration error
2022-04-18Use bot-core scheduling and member util functionsGravatar Chris Lovering-323/+53
2022-04-18Bump d.py and bot-coreGravatar Chris Lovering-7/+12
2022-04-18Bump all deps and exact version pin.Gravatar Chris Lovering-303/+503
Exact versioning has been chosen to be more explicit in what versions we require. We will be using dependabot in github to ensure these versions are kept up to date.
2022-04-18Remove aio-pika and psutilGravatar Chris Lovering-381/+432
aio-pika was used in the RabbitMQ cog (added in https://github.com/python-discord/bot/pull/90) which has since been deleted. It is no longer used. psutil was used to automatically determine how many threads to use when testing. However, this package has been quite slow to publish wheels for new Python versions. Since we don't use it for anything mission critical, I have removed it and hardcoded the number of threads to use when when testing to 8. An error is not raised it the number of threads used exceeds the number of actual threads available.
2022-04-05Parse infraction search reason as regex before calling site (#2126)Gravatar ChrisJL-0/+6
Previously this would raise an error within site due to the invalid regexp.
2022-04-03Update bot/resources/tags/type-hint.mdGravatar wookie184-1/+1
Co-authored-by: ChrisJL <[email protected]>
2022-04-02Replaced resources.md with Resources CogGravatar Eric Fletcher-6/+70
We can use this cog to get a URL with resources filtered by the terms input by the user in the Discord command.
2022-03-31feat: add created at field for message deleted log (#2122)Gravatar MaskDuck-1/+5
2022-03-31Update type-hint.mdGravatar wookie184-7/+7